diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30fdb7b9c..a634d2398 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,7 +4,9 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -* @googleapis/yoshi-java +# The @googleapis/ml-apis is the default owner for changes in this repo +* @googleapis/yoshi-java @googleapis/ml-apis +**/*.java @googleapis/ml-apis # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 000000000..1a23ea42b --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 20f3acc28..47c2ba132 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -5,3 +5,7 @@ externalManifests: - type: json file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 7b7265a20..45eef153a 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-aiplatform.git", - "sha": "99d52a7ce86d81725ad3b2335e2031be942b0d67" + "sha": "5475de2aa0099893cb2ee4988161c636a5152991" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "f15b57ccfd71106c2299e9b89835fe6e55015662" } } ] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index e2d841d6c..7513acaeb 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index bc1554aec..2b6cdbc97 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-v') steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml deleted file mode 100644 index d4d367cfc..000000000 --- a/.github/workflows/formatting.yaml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request_target: - types: [opened, synchronize] - branches: - - master -name: format -jobs: - format-code: - runs-on: ubuntu-latest - env: - ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - uses: actions/setup-java@v1 - with: - java-version: 11 - - run: "mvn com.coveo:fmt-maven-plugin:format" - - uses: googleapis/code-suggester@v1.8.0 - with: - command: review - pull_number: ${{ github.event.pull_request.number }} - git_dir: '.' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 048d80ac8..e594535ac 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -77,6 +77,11 @@ samples) source "${KOKORO_GFILE_DIR}/secret_manager/ucaip_samples_secrets" fi + if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-aiplatform-samples-secrets" ] + then + source "${KOKORO_GFILE_DIR}/secret_manager/java-aiplatform-samples-secrets" + fi + pushd samples mvn -B \ -Penable-samples \ diff --git a/.kokoro/common.sh b/.kokoro/common.sh index a8d0ea04d..ace89f45a 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -25,7 +25,6 @@ function retry_with_backoff { # allow a failures to continue set +e - echo "${command}" ${command} exit_code=$? diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg index e1c63d5c8..50f8f3fa0 100644 --- a/.kokoro/presubmit/samples.cfg +++ b/.kokoro/presubmit/samples.cfg @@ -29,5 +29,5 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account,ucaip_samples_secrets" -} \ No newline at end of file + value: "java-docs-samples-service-account,ucaip_samples_secrets,java-aiplatform-samples-secrets" +} diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh index e3a1a1008..1c51fea8b 100755 --- a/.kokoro/readme.sh +++ b/.kokoro/readme.sh @@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials git config --global credential.helper 'store --file ~/.git-credentials' python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool + +set +e python3.6 -m autosynth.synth \ --repository=googleapis/java-aiplatform \ --synth-file-name=.github/readme/synth.py \ --metadata-path=.github/readme/synth.metadata \ --pr-title="chore: regenerate README" \ - --branch-suffix="readme" \ No newline at end of file + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 76c2d2381..bf5fdf868 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -q -DskipTests=true -NAME=google-cloud-aiplatform -VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) +export NAME=google-cloud-aiplatform +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs mvn site -B -q @@ -59,7 +59,8 @@ python3 -m docuploader upload . \ popd -# V2 +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" pushd target/devsite/reference diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c482cbc5..16126d2eb 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh +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} \ - -DskipTests=true \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} if [[ -n "${AUTORELEASE_PR}" ]] then diff --git a/.repo-metadata.json b/.repo-metadata.json index 931a1f316..5cab2c497 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,8 +1,8 @@ { "name": "aiplatform", - "name_pretty": "AI Platform", + "name_pretty": "Cloud AI Platform", "product_documentation": "https://cloud.google.com/ai-platform-unified/docs", - "api_description": "brings AutoML and AI Platform (Legacy) together into a unified API, client library, and user interface.", + "api_description": "is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.", "client_documentation": "https://googleapis.dev/java/google-cloud-aiplatform/latest/index.html", "release_level": "beta", "transport": "grpc", @@ -11,5 +11,6 @@ "repo_short": "java-aiplatform", "distribution_name": "com.google.cloud:google-cloud-aiplatform", "api_id": "aiplatform.googleapis.com", - "requires_billing": true + "requires_billing": true, + "codeowner_team": "@googleapis/ml-apis" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 27cad3d83..cf8aae651 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.2.0](https://www.github.com/googleapis/java-aiplatform/compare/v0.1.0...v0.2.0) (2021-01-07) + + +### Features + +* add enhanced types for library ([#74](https://www.github.com/googleapis/java-aiplatform/issues/74)) ([7835807](https://www.github.com/googleapis/java-aiplatform/commit/783580731c9699266ca79b0ed50b035696921abf)) +* adds ValueConverter utility and demo samples ([#108](https://www.github.com/googleapis/java-aiplatform/issues/108)) ([cf0b763](https://www.github.com/googleapis/java-aiplatform/commit/cf0b763ab3c43449090b4621a8f7e9a97ada4bc6)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#102](https://www.github.com/googleapis/java-aiplatform/issues/102)) ([f0145cd](https://www.github.com/googleapis/java-aiplatform/commit/f0145cd5c32f961ae2e8c9eb688c37ed5722eaeb)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([#113](https://www.github.com/googleapis/java-aiplatform/issues/113)) ([e2d8e42](https://www.github.com/googleapis/java-aiplatform/commit/e2d8e42b9237f7a7c22826101f05c58bc26e2923)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#116](https://www.github.com/googleapis/java-aiplatform/issues/116)) ([f8a115a](https://www.github.com/googleapis/java-aiplatform/commit/f8a115a4ea2423bd9d39e79a6d55d5e253bf763e)) + ## 0.1.0 (2020-11-12) diff --git a/README.md b/README.md index ff32ccdaa..bdd0867b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Google AI Platform Client for Java +# Google Cloud AI Platform Client for Java -Java idiomatic client for [AI Platform][product-docs]. +Java idiomatic client for [Cloud AI Platform][product-docs]. [![Maven][maven-version-image]][maven-version-link] ![Stability][stability-image] @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud google-cloud-aiplatform - 0.0.1-SNAPSHOT + 0.1.1-SNAPSHOT ``` @@ -30,18 +30,25 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-aiplatform - 0.0.1-SNAPSHOT + 0.1.0 ``` -If you are using Gradle, add this to your dependencies +If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-aiplatform:0.0.0' +implementation platform('com.google.cloud:libraries-bom:16.2.1') + +compile 'com.google.cloud:google-cloud-aiplatform' +``` +If you are using Gradle without BOM, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-aiplatform:0.1.0' ``` + If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "0.0.0" +libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "0.1.0" ``` ## Authentication @@ -52,8 +59,8 @@ See the [Authentication][authentication] section in the base directory's README. ### Prerequisites -You will need a [Google Cloud Platform Console][developer-console] project with the AI Platform [API enabled][enable-api]. -You will need to [enable billing][enable-billing] to use Google AI Platform. +You will need a [Google Cloud Platform Console][developer-console] project with the Cloud AI Platform [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Cloud AI Platform. [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]`. @@ -63,13 +70,13 @@ You will need to [enable billing][enable-billing] to use Google AI Platform. You'll need to obtain the `google-cloud-aiplatform` library. See the [Quickstart](#quickstart) section to add `google-cloud-aiplatform` as a dependency in your code. -## About AI Platform +## About Cloud AI Platform -[AI Platform][product-docs] brings AutoML and AI Platform (Legacy) together into a unified API, client library, and user interface. +[Cloud AI Platform][product-docs] is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle. -See the [AI Platform client library docs][javadocs] to learn how to -use this AI Platform Client Library. +See the [Cloud AI Platform client library docs][javadocs] to learn how to +use this Cloud AI Platform Client Library. @@ -85,10 +92,15 @@ has instructions for running the samples. | Cancel Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CancelBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CancelBatchPredictionJobSample.java) | | Cancel Data Labeling Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CancelDataLabelingJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CancelDataLabelingJobSample.java) | | Cancel Training Pipeline Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CancelTrainingPipelineSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CancelTrainingPipelineSample.java) | +| Create Batch Prediction Job Bigquery Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobBigquerySample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobBigquerySample.java) | +| Create Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobSample.java) | +| Create Batch Prediction Job Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSample.java) | | Create Batch Prediction Job Video Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoClassificationSample.java) | | Create Batch Prediction Job Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSample.java) | +| Create Data Labeling Job Active Learning Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobActiveLearningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobActiveLearningSample.java) | | Create Data Labeling Job Image Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java) | | Create Data Labeling Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSample.java) | +| Create Data Labeling Job Specialist Pool Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSpecialistPoolSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSpecialistPoolSample.java) | | Create Data Labeling Job Video Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java) | | Create Dataset Image Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDatasetImageSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetImageSample.java) | | Create Dataset Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDatasetSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetSample.java) | @@ -97,6 +109,10 @@ has instructions for running the samples. | Create Dataset Text Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDatasetTextSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetTextSample.java) | | Create Dataset Video Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateDatasetVideoSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetVideoSample.java) | | Create Endpoint Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | +| Create Hyperparameter Tuning Job Python Package Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | +| Create Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | +| Create Training Pipeline Custom Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomJobSample.java) | +| Create Training Pipeline Custom Training Managed Dataset Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSample.java) | | Create Training Pipeline Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java) | | Create Training Pipeline Image Object Detection Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java) | | Create Training Pipeline Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java) | @@ -105,6 +121,7 @@ has instructions for running the samples. | Create Training Pipeline Text Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java) | | Create Training Pipeline Text Entity Extraction Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java) | | Create Training Pipeline Text Sentiment Analysis Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java) | +| Create Training Pipeline Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java) | | Create Training Pipeline Video Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java) | | Create Training Pipeline Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java) | | Delete Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeleteBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteBatchPredictionJobSample.java) | @@ -114,10 +131,13 @@ has instructions for running the samples. | Delete Export Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeleteExportModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteExportModelSample.java) | | Delete Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeleteModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteModelSample.java) | | Delete Training Pipeline Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeleteTrainingPipelineSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteTrainingPipelineSample.java) | +| Deploy Model Custom Trained Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeployModelCustomTrainedModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeployModelCustomTrainedModelSample.java) | | Deploy Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/DeployModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeployModelSample.java) | | Export Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ExportModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelSample.java) | | Export Model Tabular Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ExportModelTabularClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelTabularClassificationSample.java) | +| Export Model Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | | Get Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | +| Get Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | | Get Model Evaluation Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | | Get Model Evaluation Image Object Detection Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | | Get Model Evaluation Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java) | @@ -127,6 +147,7 @@ has instructions for running the samples. | Get Model Evaluation Text Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java) | | Get Model Evaluation Text Entity Extraction Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java) | | Get Model Evaluation Text Sentiment Analysis Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java) | +| Get Model Evaluation Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java) | | Get Model Evaluation Video Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java) | | Get Model Evaluation Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java) | | Get Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/GetModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelSample.java) | @@ -136,6 +157,7 @@ has instructions for running the samples. | Import Data Text Classification Single Label Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java) | | Import Data Text Entity Extraction Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java) | | Import Data Text Sentiment Analysis Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java) | +| Import Data Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java) | | Import Data Video Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java) | | Import Data Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | | List Model Evaluation Slice Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/master/samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | @@ -158,7 +180,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Transport -AI Platform uses gRPC for the transport layer. +Cloud AI Platform uses gRPC for the transport layer. ## Java Versions @@ -198,6 +220,8 @@ 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] +Java is a registered trademark of Oracle and/or its affiliates. + [product-docs]: https://cloud.google.com/ai-platform-unified/docs [javadocs]: https://googleapis.dev/java/google-cloud-aiplatform/latest/index.html [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-aiplatform/java7.svg diff --git a/google-cloud-aiplatform-bom/pom.xml b/google-cloud-aiplatform-bom/pom.xml index 1403ac912..02bb03006 100644 --- a/google-cloud-aiplatform-bom/pom.xml +++ b/google-cloud-aiplatform-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform-bom - 0.1.0 + 0.2.0 pom com.google.cloud @@ -68,17 +68,17 @@ com.google.cloud google-cloud-aiplatform - 0.1.0 + 0.2.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 diff --git a/google-cloud-aiplatform/pom.xml b/google-cloud-aiplatform/pom.xml index a78344d85..f996b65ab 100644 --- a/google-cloud-aiplatform/pom.xml +++ b/google-cloud-aiplatform/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform - 0.1.0 + 0.2.0 jar Google AI Platform https://github.com/googleapis/java-aiplatform @@ -11,7 +11,7 @@ com.google.cloud google-cloud-aiplatform-parent - 0.1.0 + 0.2.0 google-cloud-aiplatform @@ -83,6 +83,15 @@ testlib test + + com.google.protobuf + protobuf-java-util + + + com.google.code.gson + gson + test + diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/util/ValueConverter.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/util/ValueConverter.java new file mode 100644 index 000000000..902b1f763 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/util/ValueConverter.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.util; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.Message; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; + +/** + * Exposes utility methods for converting AI Platform messages to and from + * {@com.google.protobuf.Value} objects. + */ +public class ValueConverter { + + /** An empty {@com.google.protobuf.Value} message. */ + public static final Value EMPTY_VALUE = Value.newBuilder().build(); + + /** + * Converts a message type to a {@com.google.protobuf.Value}. + * + * @param message the message to convert + * @return the message as a {@com.google.protobuf.Value} + * @throws InvalidProtocolBufferException + */ + public static Value toValue(Message message) throws InvalidProtocolBufferException { + String jsonString = JsonFormat.printer().print(message); + Value.Builder value = Value.newBuilder(); + JsonFormat.parser().merge(jsonString, value); + return value.build(); + } + + /** + * Converts a {@com.google.protobuf.Value} to a {@com.google.protobuf.Message} of the provided + * {@com.google.protobuf.Message.Builder}. + * + * @param messageBuilder a builder for the message type + * @param value the Value to convert to a message + * @return the value as a message + * @throws InvalidProtocolBufferException + */ + public static Message fromValue(Message.Builder messageBuilder, Value value) + throws InvalidProtocolBufferException { + String valueString = JsonFormat.printer().print(value); + JsonFormat.parser().merge(valueString, messageBuilder); + return messageBuilder.build(); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClient.java index cf0858f6b..496de9e90 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -39,23 +40,12 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Service Description: - * - *

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: + * 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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
- *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
- *   Dataset response = datasetServiceClient.getDataset(name);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the datasetServiceClient object to clean up resources such + *

Note: close() needs to be called on the DatasetServiceClient 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 @@ -83,30 +73,26 @@ * *

To customize credentials: * - *

- * 
+ * 
{@code
  * DatasetServiceSettings datasetServiceSettings =
  *     DatasetServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
- * DatasetServiceClient datasetServiceClient =
- *     DatasetServiceClient.create(datasetServiceSettings);
- * 
- * 
+ * DatasetServiceClient datasetServiceClient = DatasetServiceClient.create(datasetServiceSettings); + * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * DatasetServiceSettings datasetServiceSettings =
  *     DatasetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DatasetServiceClient datasetServiceClient =
- *     DatasetServiceClient.create(datasetServiceSettings);
- * 
- * 
+ * DatasetServiceClient datasetServiceClient = DatasetServiceClient.create(datasetServiceSettings); + * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class DatasetServiceClient implements BackgroundResource { private final DatasetServiceSettings settings; private final DatasetServiceStub stub; @@ -128,7 +114,7 @@ public static final DatasetServiceClient create(DatasetServiceSettings settings) /** * Constructs an instance of DatasetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use DatasetServiceSettings}. + * for advanced usage - prefer using create(DatasetServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final DatasetServiceClient create(DatasetServiceStub stub) { @@ -166,33 +152,19 @@ public DatasetServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   Dataset response = datasetServiceClient.createDatasetAsync(parent, dataset).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the Dataset in. Format: * `projects/{project}/locations/{location}` * @param dataset Required. The Dataset 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 createDatasetAsync( LocationName parent, Dataset dataset) { CreateDatasetRequest request = @@ -203,27 +175,15 @@ public final OperationFuture createData return createDatasetAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   Dataset response = datasetServiceClient.createDatasetAsync(parent.toString(), dataset).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the Dataset in. Format: * `projects/{project}/locations/{location}` * @param dataset Required. The Dataset 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 createDatasetAsync( String parent, Dataset dataset) { CreateDatasetRequest request = @@ -231,97 +191,43 @@ public final OperationFuture createData return createDatasetAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Dataset. * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   CreateDatasetRequest request = CreateDatasetRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setDataset(dataset)
-   *     .build();
-   *   OperationFuture<Dataset, CreateDatasetOperationMetadata> future = datasetServiceClient.createDatasetOperationCallable().futureCall(request);
-   *   // Do something
-   *   Dataset response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable createDatasetOperationCallable() { return stub.createDatasetOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.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 = datasetServiceClient.createDatasetCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createDatasetCallable() { return stub.createDatasetCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   Dataset response = datasetServiceClient.getDataset(name);
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -331,19 +237,10 @@ public final Dataset getDataset(DatasetName name) { return getDataset(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   Dataset response = datasetServiceClient.getDataset(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -352,22 +249,10 @@ public final Dataset getDataset(String name) { return getDataset(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Dataset. * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Dataset response = datasetServiceClient.updateDataset(dataset, updateMask);
-   * }
-   * 
- * * @param dataset Required. The Dataset which replaces the resource on the server. * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` * definition, see @@ -425,24 +288,10 @@ public final Dataset updateDataset(Dataset dataset, FieldMask updateMask) { return updateDataset(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
-   *     .setDataset(dataset)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   Dataset response = datasetServiceClient.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 */ @@ -450,45 +299,20 @@ public final Dataset updateDataset(UpdateDatasetRequest request) { return updateDatasetCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a Dataset. * *

Sample code: - * - *


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

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Dataset element : datasetServiceClient.listDatasets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The name of the Dataset's parent resource. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -501,21 +325,10 @@ public final ListDatasetsPagedResponse listDatasets(LocationName parent) { return listDatasets(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Datasets in a Location. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Dataset element : datasetServiceClient.listDatasets(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The name of the Dataset's parent resource. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -525,24 +338,10 @@ public final ListDatasetsPagedResponse listDatasets(String parent) { return listDatasets(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Datasets in a Location. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (Dataset element : datasetServiceClient.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 */ @@ -550,81 +349,35 @@ public final ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) return listDatasetsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Datasets in a Location. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListDatasetsPagedResponse> future = datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Datasets in a Location. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListDatasetsResponse response = datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   datasetServiceClient.deleteDatasetAsync(name).get();
-   * }
-   * 
- * * @param name Required. The resource name of the Dataset to delete. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @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 = @@ -632,124 +385,62 @@ public final OperationFuture deleteDatasetAsync( return deleteDatasetAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   datasetServiceClient.deleteDatasetAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The resource name of the Dataset to delete. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Dataset. * *

Sample code: - * - *


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

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   List<ImportDataConfig> importConfigs = new ArrayList<>();
-   *   ImportDataResponse response = datasetServiceClient.importDataAsync(name, importConfigs).get();
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @param importConfigs Required. The desired input locations. The contents of all input locations * will be imported in one batch. * @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, List importConfigs) { ImportDataRequest request = @@ -760,28 +451,16 @@ public final OperationFuture im return importDataAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports data into a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   List<ImportDataConfig> importConfigs = new ArrayList<>();
-   *   ImportDataResponse response = datasetServiceClient.importDataAsync(name.toString(), importConfigs).get();
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @param importConfigs Required. The desired input locations. The contents of all input locations * will be imported in one batch. * @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, List importConfigs) { ImportDataRequest request = @@ -789,105 +468,48 @@ public final OperationFuture im return importDataAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports data into a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   List<ImportDataConfig> importConfigs = new ArrayList<>();
-   *   ImportDataRequest request = ImportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .addAllImportConfigs(importConfigs)
-   *     .build();
-   *   ImportDataResponse response = datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports data into a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   List<ImportDataConfig> importConfigs = new ArrayList<>();
-   *   ImportDataRequest request = ImportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .addAllImportConfigs(importConfigs)
-   *     .build();
-   *   OperationFuture<ImportDataResponse, ImportDataOperationMetadata> future = datasetServiceClient.importDataOperationCallable().futureCall(request);
-   *   // Do something
-   *   ImportDataResponse response = 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports data into a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   List<ImportDataConfig> importConfigs = new ArrayList<>();
-   *   ImportDataRequest request = ImportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .addAllImportConfigs(importConfigs)
-   *     .build();
-   *   ApiFuture<Operation> future = datasetServiceClient.importDataCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable importDataCallable() { return stub.importDataCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports data from a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
-   *   ExportDataResponse response = datasetServiceClient.exportDataAsync(name, exportConfig).get();
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @param exportConfig 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, ExportDataConfig exportConfig) { ExportDataRequest request = @@ -898,27 +520,15 @@ public final OperationFuture ex return exportDataAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports data from a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
-   *   ExportDataResponse response = datasetServiceClient.exportDataAsync(name.toString(), exportConfig).get();
-   * }
-   * 
- * * @param name Required. The name of the Dataset resource. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @param exportConfig 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, ExportDataConfig exportConfig) { ExportDataRequest request = @@ -926,99 +536,43 @@ public final OperationFuture ex return exportDataAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports data from a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
-   *   ExportDataRequest request = ExportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setExportConfig(exportConfig)
-   *     .build();
-   *   ExportDataResponse response = datasetServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports data from a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
-   *   ExportDataRequest request = ExportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setExportConfig(exportConfig)
-   *     .build();
-   *   OperationFuture<ExportDataResponse, ExportDataOperationMetadata> future = datasetServiceClient.exportDataOperationCallable().futureCall(request);
-   *   // Do something
-   *   ExportDataResponse response = 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports data from a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
-   *   ExportDataRequest request = ExportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setExportConfig(exportConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = datasetServiceClient.exportDataCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable exportDataCallable() { return stub.exportDataCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataItems in a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   for (DataItem element : datasetServiceClient.listDataItems(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Dataset to list DataItems from. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1031,21 +585,10 @@ public final ListDataItemsPagedResponse listDataItems(DatasetName parent) { return listDataItems(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataItems in a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   for (DataItem element : datasetServiceClient.listDataItems(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Dataset to list DataItems from. Format: * `projects/{project}/locations/{location}/datasets/{dataset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1055,24 +598,10 @@ public final ListDataItemsPagedResponse listDataItems(String parent) { return listDataItems(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataItems in a Dataset. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (DataItem element : datasetServiceClient.listDataItems(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 */ @@ -1080,75 +609,31 @@ public final ListDataItemsPagedResponse listDataItems(ListDataItemsRequest reque return listDataItemsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataItems in a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListDataItemsPagedResponse> future = datasetServiceClient.listDataItemsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (DataItem element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listDataItemsPagedCallable() { return stub.listDataItemsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataItems in a Dataset. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListDataItemsResponse response = datasetServiceClient.listDataItemsCallable().call(request);
-   *     for (DataItem element : response.getDataItemsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listDataItemsCallable() { return stub.listDataItemsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an AnnotationSpec. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   AnnotationSpec response = datasetServiceClient.getAnnotationSpec(name);
-   * }
-   * 
- * * @param name Required. The name of the AnnotationSpec resource. Format: *

`projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1161,19 +646,10 @@ public final AnnotationSpec getAnnotationSpec(AnnotationSpecName name) { return getAnnotationSpec(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an AnnotationSpec. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   AnnotationSpec response = datasetServiceClient.getAnnotationSpec(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the AnnotationSpec resource. Format: *

`projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1183,22 +659,10 @@ public final AnnotationSpec getAnnotationSpec(String name) { return getAnnotationSpec(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an AnnotationSpec. * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   AnnotationSpec response = datasetServiceClient.getAnnotationSpec(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 */ @@ -1206,43 +670,20 @@ public final AnnotationSpec getAnnotationSpec(GetAnnotationSpecRequest request) return getAnnotationSpecCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an AnnotationSpec. * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<AnnotationSpec> future = datasetServiceClient.getAnnotationSpecCallable().futureCall(request);
-   *   // Do something
-   *   AnnotationSpec response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getAnnotationSpecCallable() { return stub.getAnnotationSpecCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Annotations belongs to a dataitem * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
-   *   for (Annotation element : datasetServiceClient.listAnnotations(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the DataItem to list Annotations from. Format: *

`projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1255,21 +696,10 @@ public final ListAnnotationsPagedResponse listAnnotations(DataItemName parent) { return listAnnotations(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Annotations belongs to a dataitem * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
-   *   for (Annotation element : datasetServiceClient.listAnnotations(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the DataItem to list Annotations from. Format: *

`projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1279,24 +709,10 @@ public final ListAnnotationsPagedResponse listAnnotations(String parent) { return listAnnotations(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Annotations belongs to a dataitem * - *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
-   *   ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (Annotation element : datasetServiceClient.listAnnotations(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 */ @@ -1304,57 +720,22 @@ public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest return listAnnotationsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Annotations belongs to a dataitem * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
-   *   ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListAnnotationsPagedResponse> future = datasetServiceClient.listAnnotationsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Annotation element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listAnnotationsPagedCallable() { return stub.listAnnotationsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Annotations belongs to a dataitem * *

Sample code: - * - *


-   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
-   *   DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
-   *   ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListAnnotationsResponse response = datasetServiceClient.listAnnotationsCallable().call(request);
-   *     for (Annotation element : response.getAnnotationsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listAnnotationsCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceSettings.java index da6adca23..dfc367edc 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse; @@ -38,7 +39,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link DatasetServiceClient}. * @@ -55,31 +56,30 @@ * *

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

- * 
+ * 
{@code
  * DatasetServiceSettings.Builder datasetServiceSettingsBuilder =
  *     DatasetServiceSettings.newBuilder();
  * datasetServiceSettingsBuilder
  *     .getDatasetSettings()
  *     .setRetrySettings(
- *         datasetServiceSettingsBuilder.getDatasetSettings().getRetrySettings().toBuilder()
+ *         datasetServiceSettingsBuilder
+ *             .getDatasetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * DatasetServiceSettings datasetServiceSettings = datasetServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class DatasetServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createDataset. */ public UnaryCallSettings createDatasetSettings() { return ((DatasetServiceStubSettings) getStubSettings()).createDatasetSettings(); } /** Returns the object with the settings used for calls to createDataset. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings createDatasetOperationSettings() { return ((DatasetServiceStubSettings) getStubSettings()).createDatasetOperationSettings(); @@ -107,8 +107,6 @@ public UnaryCallSettings 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 ((DatasetServiceStubSettings) getStubSettings()).deleteDatasetOperationSettings(); @@ -120,8 +118,6 @@ public UnaryCallSettings 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 ((DatasetServiceStubSettings) getStubSettings()).importDataOperationSettings(); @@ -133,8 +129,6 @@ public UnaryCallSettings 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 ((DatasetServiceStubSettings) getStubSettings()).exportDataOperationSettings(); @@ -218,18 +212,15 @@ protected DatasetServiceSettings(Builder settingsBuilder) throws IOException { /** Builder for DatasetServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(DatasetServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(DatasetServiceStubSettings.newBuilder()); - } - protected Builder(DatasetServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -238,11 +229,15 @@ protected Builder(DatasetServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(DatasetServiceStubSettings.newBuilder()); + } + public DatasetServiceStubSettings.Builder getStubSettingsBuilder() { return ((DatasetServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -261,8 +256,6 @@ public UnaryCallSettings.Builder createDatasetS } /** Returns the builder for the settings used for calls to createDataset. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< CreateDatasetRequest, Dataset, CreateDatasetOperationMetadata> createDatasetOperationSettings() { @@ -292,8 +285,6 @@ public UnaryCallSettings.Builder deleteDatasetS } /** 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(); @@ -305,8 +296,6 @@ public UnaryCallSettings.Builder importDataSetting } /** 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< ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> importDataOperationSettings() { @@ -319,8 +308,6 @@ public UnaryCallSettings.Builder exportDataSetting } /** 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< ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> exportDataOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClient.java index cbffc43d3..83b583f35 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -40,23 +41,12 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Service Description: - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * 
- * 
+ * 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: * - *

Note: close() needs to be called on the endpointServiceClient object to clean up resources + *

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

To customize credentials: * - *

- * 
+ * 
{@code
  * EndpointServiceSettings endpointServiceSettings =
  *     EndpointServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * EndpointServiceClient endpointServiceClient =
  *     EndpointServiceClient.create(endpointServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * EndpointServiceSettings endpointServiceSettings =
  *     EndpointServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * EndpointServiceClient endpointServiceClient =
  *     EndpointServiceClient.create(endpointServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class EndpointServiceClient implements BackgroundResource { private final EndpointServiceSettings settings; private final EndpointServiceStub stub; @@ -130,7 +118,7 @@ public static final EndpointServiceClient create(EndpointServiceSettings setting /** * Constructs an instance of EndpointServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use EndpointServiceSettings}. + * for advanced usage - prefer using create(EndpointServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final EndpointServiceClient create(EndpointServiceStub stub) { @@ -168,33 +156,19 @@ public EndpointServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(parent, endpoint).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the Endpoint in. Format: * `projects/{project}/locations/{location}` * @param endpoint Required. The Endpoint 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 createEndpointAsync( LocationName parent, Endpoint endpoint) { CreateEndpointRequest request = @@ -205,27 +179,15 @@ public final OperationFuture createEn return createEndpointAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(parent.toString(), endpoint).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the Endpoint in. Format: * `projects/{project}/locations/{location}` * @param endpoint Required. The Endpoint 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 createEndpointAsync( String parent, Endpoint endpoint) { CreateEndpointRequest request = @@ -233,97 +195,43 @@ public final OperationFuture createEn return createEndpointAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   CreateEndpointRequest request = CreateEndpointRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setEndpoint(endpoint)
-   *     .build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(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 createEndpointAsync( CreateEndpointRequest request) { return createEndpointOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   CreateEndpointRequest request = CreateEndpointRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setEndpoint(endpoint)
-   *     .build();
-   *   OperationFuture<Endpoint, CreateEndpointOperationMetadata> future = endpointServiceClient.createEndpointOperationCallable().futureCall(request);
-   *   // Do something
-   *   Endpoint response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable createEndpointOperationCallable() { return stub.createEndpointOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   CreateEndpointRequest request = CreateEndpointRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setEndpoint(endpoint)
-   *     .build();
-   *   ApiFuture<Operation> future = endpointServiceClient.createEndpointCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createEndpointCallable() { return stub.createEndpointCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   Endpoint response = endpointServiceClient.getEndpoint(name);
-   * }
-   * 
- * * @param name Required. The name of the Endpoint resource. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -334,19 +242,10 @@ public final Endpoint getEndpoint(EndpointName name) { return getEndpoint(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   Endpoint response = endpointServiceClient.getEndpoint(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the Endpoint resource. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -356,22 +255,10 @@ public final Endpoint getEndpoint(String name) { return getEndpoint(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   GetEndpointRequest request = GetEndpointRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   Endpoint response = endpointServiceClient.getEndpoint(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 */ @@ -379,43 +266,20 @@ public final Endpoint getEndpoint(GetEndpointRequest request) { return getEndpointCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   GetEndpointRequest request = GetEndpointRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Endpoint> future = endpointServiceClient.getEndpointCallable().futureCall(request);
-   *   // Do something
-   *   Endpoint response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getEndpointCallable() { return stub.getEndpointCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Endpoints in a Location. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location from which to list the Endpoints. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -428,21 +292,10 @@ public final ListEndpointsPagedResponse listEndpoints(LocationName parent) { return listEndpoints(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Endpoints in a Location. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location from which to list the Endpoints. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -452,24 +305,10 @@ public final ListEndpointsPagedResponse listEndpoints(String parent) { return listEndpoints(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Endpoints in a Location. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListEndpointsRequest request = ListEndpointsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(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 */ @@ -477,76 +316,31 @@ public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest reque return listEndpointsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Endpoints in a Location. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListEndpointsRequest request = ListEndpointsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListEndpointsPagedResponse> future = endpointServiceClient.listEndpointsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Endpoint element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listEndpointsPagedCallable() { return stub.listEndpointsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Endpoints in a Location. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListEndpointsRequest request = ListEndpointsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListEndpointsResponse response = endpointServiceClient.listEndpointsCallable().call(request);
-   *     for (Endpoint element : response.getEndpointsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listEndpointsCallable() { return stub.listEndpointsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.updateEndpoint(endpoint, updateMask);
-   * }
-   * 
- * * @param endpoint Required. The Endpoint 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 @@ -557,24 +351,10 @@ public final Endpoint updateEndpoint(Endpoint endpoint, FieldMask updateMask) { return updateEndpoint(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateEndpointRequest request = UpdateEndpointRequest.newBuilder()
-   *     .setEndpoint(endpoint)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   Endpoint response = endpointServiceClient.updateEndpoint(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 */ @@ -582,49 +362,24 @@ public final Endpoint updateEndpoint(UpdateEndpointRequest request) { return updateEndpointCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateEndpointRequest request = UpdateEndpointRequest.newBuilder()
-   *     .setEndpoint(endpoint)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Endpoint> future = endpointServiceClient.updateEndpointCallable().futureCall(request);
-   *   // Do something
-   *   Endpoint response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateEndpointCallable() { return stub.updateEndpointCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   endpointServiceClient.deleteEndpointAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the Endpoint resource to be deleted. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @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 deleteEndpointAsync( EndpointName name) { DeleteEndpointRequest request = @@ -632,117 +387,56 @@ public final OperationFuture deleteEndpointAsync return deleteEndpointAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   endpointServiceClient.deleteEndpointAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the Endpoint resource to be deleted. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @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 deleteEndpointAsync(String name) { DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder().setName(name).build(); return deleteEndpointAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Endpoint. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   endpointServiceClient.deleteEndpointAsync(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 deleteEndpointAsync( DeleteEndpointRequest request) { return deleteEndpointOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = endpointServiceClient.deleteEndpointOperationCallable().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 deleteEndpointOperationCallable() { return stub.deleteEndpointOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Endpoint. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = endpointServiceClient.deleteEndpointCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteEndpointCallable() { return stub.deleteEndpointCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   Map<String, Integer> trafficSplit = new HashMap<>();
-   *   DeployModelResponse response = endpointServiceClient.deployModelAsync(endpoint, deployedModel, trafficSplit).get();
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model. * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that @@ -761,8 +455,6 @@ public final UnaryCallable deleteEndpointCalla * [traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] is not updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture deployModelAsync( EndpointName endpoint, DeployedModel deployedModel, Map trafficSplit) { DeployModelRequest request = @@ -774,21 +466,10 @@ public final OperationFuture return deployModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   Map<String, Integer> trafficSplit = new HashMap<>();
-   *   DeployModelResponse response = endpointServiceClient.deployModelAsync(endpoint.toString(), deployedModel, trafficSplit).get();
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model. * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that @@ -807,8 +488,6 @@ public final OperationFuture * [traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] is not updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture deployModelAsync( String endpoint, DeployedModel deployedModel, Map trafficSplit) { DeployModelRequest request = @@ -820,101 +499,45 @@ public final OperationFuture return deployModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModel(deployedModel)
-   *     .build();
-   *   DeployModelResponse response = endpointServiceClient.deployModelAsync(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 deployModelAsync( DeployModelRequest request) { return deployModelOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModel(deployedModel)
-   *     .build();
-   *   OperationFuture<DeployModelResponse, DeployModelOperationMetadata> future = endpointServiceClient.deployModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   DeployModelResponse response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> deployModelOperationCallable() { return stub.deployModelOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModel(deployedModel)
-   *     .build();
-   *   ApiFuture<Operation> future = endpointServiceClient.deployModelCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable deployModelCallable() { return stub.deployModelCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "";
-   *   Map<String, Integer> trafficSplit = new HashMap<>();
-   *   UndeployModelResponse response = endpointServiceClient.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get();
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model. * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the @@ -927,8 +550,6 @@ public final UnaryCallable deployModelCallable() * this method executes, or if this field unassigns any traffic to it. * @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 undeployModelAsync( EndpointName endpoint, String deployedModelId, Map trafficSplit) { @@ -941,22 +562,11 @@ public final UnaryCallable deployModelCallable() return undeployModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "";
-   *   Map<String, Integer> trafficSplit = new HashMap<>();
-   *   UndeployModelResponse response = endpointServiceClient.undeployModelAsync(endpoint.toString(), deployedModelId, trafficSplit).get();
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model. * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the @@ -969,8 +579,6 @@ public final UnaryCallable deployModelCallable() * this method executes, or if this field unassigns any traffic to it. * @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 undeployModelAsync( String endpoint, String deployedModelId, Map trafficSplit) { @@ -983,83 +591,38 @@ public final UnaryCallable deployModelCallable() return undeployModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * - *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "";
-   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModelId(deployedModelId)
-   *     .build();
-   *   UndeployModelResponse response = endpointServiceClient.undeployModelAsync(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 undeployModelAsync(UndeployModelRequest request) { return undeployModelOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "";
-   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModelId(deployedModelId)
-   *     .build();
-   *   OperationFuture<UndeployModelResponse, UndeployModelOperationMetadata> future = endpointServiceClient.undeployModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   UndeployModelResponse response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationCallable() { return stub.undeployModelOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * *

Sample code: - * - *


-   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "";
-   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .setDeployedModelId(deployedModelId)
-   *     .build();
-   *   ApiFuture<Operation> future = endpointServiceClient.undeployModelCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable undeployModelCallable() { return stub.undeployModelCallable(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceSettings.java index ea97e2976..0d18654ac 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.EndpointServiceClient.ListEndpointsPagedResponse; @@ -36,7 +37,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link EndpointServiceClient}. * @@ -53,31 +54,30 @@ * *

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

- * 
+ * 
{@code
  * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
  *     EndpointServiceSettings.newBuilder();
  * endpointServiceSettingsBuilder
  *     .getEndpointSettings()
  *     .setRetrySettings(
- *         endpointServiceSettingsBuilder.getEndpointSettings().getRetrySettings().toBuilder()
+ *         endpointServiceSettingsBuilder
+ *             .getEndpointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * EndpointServiceSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class EndpointServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createEndpoint. */ public UnaryCallSettings createEndpointSettings() { return ((EndpointServiceStubSettings) getStubSettings()).createEndpointSettings(); } /** Returns the object with the settings used for calls to createEndpoint. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings createEndpointOperationSettings() { return ((EndpointServiceStubSettings) getStubSettings()).createEndpointOperationSettings(); @@ -105,8 +105,6 @@ public UnaryCallSettings deleteEndpointSetting } /** Returns the object with the settings used for calls to deleteEndpoint. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteEndpointOperationSettings() { return ((EndpointServiceStubSettings) getStubSettings()).deleteEndpointOperationSettings(); @@ -118,8 +116,6 @@ public UnaryCallSettings deployModelSettings() { } /** Returns the object with the settings used for calls to deployModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> deployModelOperationSettings() { @@ -132,8 +128,6 @@ public UnaryCallSettings undeployModelSettings( } /** Returns the object with the settings used for calls to undeployModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationSettings() { @@ -200,18 +194,15 @@ protected EndpointServiceSettings(Builder settingsBuilder) throws IOException { /** Builder for EndpointServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(EndpointServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(EndpointServiceStubSettings.newBuilder()); - } - protected Builder(EndpointServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -220,11 +211,15 @@ protected Builder(EndpointServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(EndpointServiceStubSettings.newBuilder()); + } + public EndpointServiceStubSettings.Builder getStubSettingsBuilder() { return ((EndpointServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -243,8 +238,6 @@ public UnaryCallSettings.Builder createEndpoin } /** Returns the builder for the settings used for calls to createEndpoint. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> createEndpointOperationSettings() { @@ -274,8 +267,6 @@ public UnaryCallSettings.Builder deleteEndpoin } /** Returns the builder for the settings used for calls to deleteEndpoint. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder deleteEndpointOperationSettings() { return getStubSettingsBuilder().deleteEndpointOperationSettings(); @@ -287,8 +278,6 @@ public UnaryCallSettings.Builder deployModelSetti } /** Returns the builder for the settings used for calls to deployModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> deployModelOperationSettings() { @@ -301,8 +290,6 @@ public UnaryCallSettings.Builder undeployModelS } /** Returns the builder for the settings used for calls to undeployModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java index 3a0e15975..7425d2019 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -38,24 +39,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service for creating and managing AI Platform's jobs. * *

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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   CustomJob customJob = CustomJob.newBuilder().build();
- *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the jobServiceClient object to clean up resources such as + *

Note: close() needs to be called on the JobServiceClient 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 @@ -83,30 +74,26 @@ * *

To customize credentials: * - *

- * 
+ * 
{@code
  * JobServiceSettings jobServiceSettings =
  *     JobServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
- * JobServiceClient jobServiceClient =
- *     JobServiceClient.create(jobServiceSettings);
- * 
- * 
+ * JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings); + * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * JobServiceSettings jobServiceSettings =
  *     JobServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobServiceClient jobServiceClient =
- *     JobServiceClient.create(jobServiceSettings);
- * 
- * 
+ * JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings); + * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class JobServiceClient implements BackgroundResource { private final JobServiceSettings settings; private final JobServiceStub stub; @@ -127,7 +114,7 @@ public static final JobServiceClient create(JobServiceSettings settings) throws /** * Constructs an instance of JobServiceClient, using the given stub for making calls. This is for - * advanced usage - prefer to use JobServiceSettings}. + * advanced usage - prefer using create(JobServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final JobServiceClient create(JobServiceStub stub) { @@ -164,26 +151,14 @@ public JobServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   CustomJob customJob = CustomJob.newBuilder().build();
-   *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the CustomJob in. Format: * `projects/{project}/locations/{location}` * @param customJob Required. The CustomJob to create. @@ -198,20 +173,10 @@ public final CustomJob createCustomJob(LocationName parent, CustomJob customJob) return createCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   CustomJob customJob = CustomJob.newBuilder().build();
-   *   CustomJob response = jobServiceClient.createCustomJob(parent.toString(), customJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the CustomJob in. Format: * `projects/{project}/locations/{location}` * @param customJob Required. The CustomJob to create. @@ -223,24 +188,10 @@ public final CustomJob createCustomJob(String parent, CustomJob customJob) { return createCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   CustomJob customJob = CustomJob.newBuilder().build();
-   *   CreateCustomJobRequest request = CreateCustomJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setCustomJob(customJob)
-   *     .build();
-   *   CustomJob response = jobServiceClient.createCustomJob(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 */ @@ -248,43 +199,20 @@ public final CustomJob createCustomJob(CreateCustomJobRequest request) { return createCustomJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   CustomJob customJob = CustomJob.newBuilder().build();
-   *   CreateCustomJobRequest request = CreateCustomJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setCustomJob(customJob)
-   *     .build();
-   *   ApiFuture<CustomJob> future = jobServiceClient.createCustomJobCallable().futureCall(request);
-   *   // Do something
-   *   CustomJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createCustomJobCallable() { return stub.createCustomJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   CustomJob response = jobServiceClient.getCustomJob(name);
-   * }
-   * 
- * * @param name Required. The name of the CustomJob resource. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -295,19 +223,10 @@ public final CustomJob getCustomJob(CustomJobName name) { return getCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   CustomJob response = jobServiceClient.getCustomJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the CustomJob resource. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -317,22 +236,10 @@ public final CustomJob getCustomJob(String name) { return getCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   GetCustomJobRequest request = GetCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   CustomJob response = jobServiceClient.getCustomJob(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 */ @@ -340,43 +247,20 @@ public final CustomJob getCustomJob(GetCustomJobRequest request) { return getCustomJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a CustomJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   GetCustomJobRequest request = GetCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<CustomJob> future = jobServiceClient.getCustomJobCallable().futureCall(request);
-   *   // Do something
-   *   CustomJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getCustomJobCallable() { return stub.getCustomJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CustomJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (CustomJob element : jobServiceClient.listCustomJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the CustomJobs from. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -389,21 +273,10 @@ public final ListCustomJobsPagedResponse listCustomJobs(LocationName parent) { return listCustomJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CustomJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (CustomJob element : jobServiceClient.listCustomJobs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the CustomJobs from. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -413,24 +286,10 @@ public final ListCustomJobsPagedResponse listCustomJobs(String parent) { return listCustomJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CustomJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (CustomJob element : jobServiceClient.listCustomJobs(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 */ @@ -438,82 +297,36 @@ public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest re return listCustomJobsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CustomJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListCustomJobsPagedResponse> future = jobServiceClient.listCustomJobsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (CustomJob element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listCustomJobsPagedCallable() { return stub.listCustomJobsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CustomJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListCustomJobsResponse response = jobServiceClient.listCustomJobsCallable().call(request);
-   *     for (CustomJob element : response.getCustomJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listCustomJobsCallable() { return stub.listCustomJobsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   jobServiceClient.deleteCustomJobAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the CustomJob resource to be deleted. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @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 deleteCustomJobAsync( CustomJobName name) { DeleteCustomJobRequest request = @@ -521,103 +334,53 @@ public final OperationFuture deleteCustomJobAsyn return deleteCustomJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   jobServiceClient.deleteCustomJobAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the CustomJob resource to be deleted. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @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 deleteCustomJobAsync(String name) { DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder().setName(name).build(); return deleteCustomJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a CustomJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.deleteCustomJobAsync(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 deleteCustomJobAsync( DeleteCustomJobRequest request) { return deleteCustomJobOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a CustomJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteCustomJobOperationCallable().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 deleteCustomJobOperationCallable() { return stub.deleteCustomJobOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a CustomJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.deleteCustomJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteCustomJobCallable() { return stub.deleteCustomJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best * effort to cancel the job, but success is not guaranteed. Clients can use @@ -628,15 +391,6 @@ public final UnaryCallable deleteCustomJobCal * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and * [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   jobServiceClient.cancelCustomJob(name);
-   * }
-   * 
- * * @param name Required. The name of the CustomJob to cancel. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -647,7 +401,7 @@ public final void cancelCustomJob(CustomJobName name) { cancelCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best * effort to cancel the job, but success is not guaranteed. Clients can use @@ -658,15 +412,6 @@ public final void cancelCustomJob(CustomJobName name) { * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and * [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   jobServiceClient.cancelCustomJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the CustomJob to cancel. Format: * `projects/{project}/locations/{location}/customJobs/{custom_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -676,7 +421,7 @@ public final void cancelCustomJob(String name) { cancelCustomJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best * effort to cancel the job, but success is not guaranteed. Clients can use @@ -687,18 +432,6 @@ public final void cancelCustomJob(String name) { * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and * [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.cancelCustomJob(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 */ @@ -706,7 +439,7 @@ public final void cancelCustomJob(CancelCustomJobRequest request) { cancelCustomJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best * effort to cancel the job, but success is not guaranteed. Clients can use @@ -718,37 +451,15 @@ public final void cancelCustomJob(CancelCustomJobRequest request) { * [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
-   *   CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.cancelCustomJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable cancelCustomJobCallable() { return stub.cancelCustomJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
-   *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent, dataLabelingJob);
-   * }
-   * 
- * * @param parent Required. The parent of the DataLabelingJob. Format: * `projects/{project}/locations/{location}` * @param dataLabelingJob Required. The DataLabelingJob to create. @@ -764,20 +475,10 @@ public final DataLabelingJob createDataLabelingJob( return createDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
-   *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent.toString(), dataLabelingJob);
-   * }
-   * 
- * * @param parent Required. The parent of the DataLabelingJob. Format: * `projects/{project}/locations/{location}` * @param dataLabelingJob Required. The DataLabelingJob to create. @@ -793,24 +494,10 @@ public final DataLabelingJob createDataLabelingJob( return createDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
-   *   CreateDataLabelingJobRequest request = CreateDataLabelingJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setDataLabelingJob(dataLabelingJob)
-   *     .build();
-   *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(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 */ @@ -818,44 +505,21 @@ public final DataLabelingJob createDataLabelingJob(CreateDataLabelingJobRequest return createDataLabelingJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a DataLabelingJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
-   *   CreateDataLabelingJobRequest request = CreateDataLabelingJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setDataLabelingJob(dataLabelingJob)
-   *     .build();
-   *   ApiFuture<DataLabelingJob> future = jobServiceClient.createDataLabelingJobCallable().futureCall(request);
-   *   // Do something
-   *   DataLabelingJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createDataLabelingJobCallable() { return stub.createDataLabelingJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(name);
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -868,19 +532,10 @@ public final DataLabelingJob getDataLabelingJob(DataLabelingJobName name) { return getDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -891,22 +546,10 @@ public final DataLabelingJob getDataLabelingJob(String name) { return getDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   GetDataLabelingJobRequest request = GetDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(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 */ @@ -914,44 +557,21 @@ public final DataLabelingJob getDataLabelingJob(GetDataLabelingJobRequest reques return getDataLabelingJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a DataLabelingJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   GetDataLabelingJobRequest request = GetDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<DataLabelingJob> future = jobServiceClient.getDataLabelingJobCallable().futureCall(request);
-   *   // Do something
-   *   DataLabelingJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getDataLabelingJobCallable() { return stub.getDataLabelingJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataLabelingJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The parent of the DataLabelingJob. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -964,21 +584,10 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(LocationName return listDataLabelingJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataLabelingJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The parent of the DataLabelingJob. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -989,24 +598,10 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(String paren return listDataLabelingJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataLabelingJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(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 */ @@ -1015,82 +610,36 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs( return listDataLabelingJobsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataLabelingJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListDataLabelingJobsPagedResponse> future = jobServiceClient.listDataLabelingJobsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (DataLabelingJob element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listDataLabelingJobsPagedCallable() { return stub.listDataLabelingJobsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DataLabelingJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListDataLabelingJobsResponse response = jobServiceClient.listDataLabelingJobsCallable().call(request);
-   *     for (DataLabelingJob element : response.getDataLabelingJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listDataLabelingJobsCallable() { return stub.listDataLabelingJobsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   jobServiceClient.deleteDataLabelingJobAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob to be deleted. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @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 deleteDataLabelingJobAsync( DataLabelingJobName name) { DeleteDataLabelingJobRequest request = @@ -1100,25 +649,14 @@ public final OperationFuture deleteDataLabelingJ return deleteDataLabelingJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   jobServiceClient.deleteDataLabelingJobAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob to be deleted. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @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 deleteDataLabelingJobAsync( String name) { DeleteDataLabelingJobRequest request = @@ -1126,92 +664,44 @@ public final OperationFuture deleteDataLabelingJ return deleteDataLabelingJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a DataLabelingJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.deleteDataLabelingJobAsync(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 deleteDataLabelingJobAsync( DeleteDataLabelingJobRequest request) { return deleteDataLabelingJobOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a DataLabelingJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteDataLabelingJobOperationCallable().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 deleteDataLabelingJobOperationCallable() { return stub.deleteDataLabelingJobOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a DataLabelingJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.deleteDataLabelingJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteDataLabelingJobCallable() { return stub.deleteDataLabelingJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   jobServiceClient.cancelDataLabelingJob(name);
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1224,19 +714,10 @@ public final void cancelDataLabelingJob(DataLabelingJobName name) { cancelDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   jobServiceClient.cancelDataLabelingJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the DataLabelingJob. Format: *

`projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1247,22 +728,10 @@ public final void cancelDataLabelingJob(String name) { cancelDataLabelingJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   CancelDataLabelingJobRequest request = CancelDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.cancelDataLabelingJob(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 */ @@ -1270,42 +739,20 @@ public final void cancelDataLabelingJob(CancelDataLabelingJobRequest request) { cancelDataLabelingJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
-   *   CancelDataLabelingJobRequest request = CancelDataLabelingJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.cancelDataLabelingJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable cancelDataLabelingJobCallable() { return stub.cancelDataLabelingJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build();
-   *   HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(parent, hyperparameterTuningJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the HyperparameterTuningJob * in. Format: `projects/{project}/locations/{location}` * @param hyperparameterTuningJob Required. The HyperparameterTuningJob to create. @@ -1321,20 +768,10 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( return createHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build();
-   *   HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(parent.toString(), hyperparameterTuningJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the HyperparameterTuningJob * in. Format: `projects/{project}/locations/{location}` * @param hyperparameterTuningJob Required. The HyperparameterTuningJob to create. @@ -1350,24 +787,10 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( return createHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build();
-   *   CreateHyperparameterTuningJobRequest request = CreateHyperparameterTuningJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setHyperparameterTuningJob(hyperparameterTuningJob)
-   *     .build();
-   *   HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(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 */ @@ -1376,44 +799,21 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( return createHyperparameterTuningJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a HyperparameterTuningJob * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build();
-   *   CreateHyperparameterTuningJobRequest request = CreateHyperparameterTuningJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setHyperparameterTuningJob(hyperparameterTuningJob)
-   *     .build();
-   *   ApiFuture<HyperparameterTuningJob> future = jobServiceClient.createHyperparameterTuningJobCallable().futureCall(request);
-   *   // Do something
-   *   HyperparameterTuningJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createHyperparameterTuningJobCallable() { return stub.createHyperparameterTuningJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name);
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob resource. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1427,19 +827,10 @@ public final HyperparameterTuningJob getHyperparameterTuningJob( return getHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob resource. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1450,22 +841,10 @@ public final HyperparameterTuningJob getHyperparameterTuningJob(String name) { return getHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a HyperparameterTuningJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   GetHyperparameterTuningJobRequest request = GetHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(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 */ @@ -1474,44 +853,21 @@ public final HyperparameterTuningJob getHyperparameterTuningJob( return getHyperparameterTuningJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a HyperparameterTuningJob * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   GetHyperparameterTuningJobRequest request = GetHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<HyperparameterTuningJob> future = jobServiceClient.getHyperparameterTuningJobCallable().futureCall(request);
-   *   // Do something
-   *   HyperparameterTuningJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getHyperparameterTuningJobCallable() { return stub.getHyperparameterTuningJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists HyperparameterTuningJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the HyperparameterTuningJobs * from. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1525,21 +881,10 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ return listHyperparameterTuningJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists HyperparameterTuningJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the HyperparameterTuningJobs * from. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1551,24 +896,10 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ return listHyperparameterTuningJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists HyperparameterTuningJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(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 */ @@ -1577,25 +908,11 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ return listHyperparameterTuningJobsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists HyperparameterTuningJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListHyperparameterTuningJobsPagedResponse> future = jobServiceClient.listHyperparameterTuningJobsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (HyperparameterTuningJob element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> @@ -1603,32 +920,11 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ return stub.listHyperparameterTuningJobsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists HyperparameterTuningJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListHyperparameterTuningJobsResponse response = jobServiceClient.listHyperparameterTuningJobsCallable().call(request);
-   *     for (HyperparameterTuningJob element : response.getHyperparameterTuningJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> @@ -1636,25 +932,14 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ return stub.listHyperparameterTuningJobsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a HyperparameterTuningJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   jobServiceClient.deleteHyperparameterTuningJobAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob resource to be deleted. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @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 deleteHyperparameterTuningJobAsync( HyperparameterTuningJobName name) { DeleteHyperparameterTuningJobRequest request = @@ -1664,25 +949,14 @@ public final OperationFuture deleteHyperparamete return deleteHyperparameterTuningJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a HyperparameterTuningJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   jobServiceClient.deleteHyperparameterTuningJobAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob resource to be deleted. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @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 deleteHyperparameterTuningJobAsync( String name) { DeleteHyperparameterTuningJobRequest request = @@ -1690,81 +964,42 @@ public final OperationFuture deleteHyperparamete return deleteHyperparameterTuningJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a HyperparameterTuningJob. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.deleteHyperparameterTuningJobAsync(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 deleteHyperparameterTuningJobAsync( DeleteHyperparameterTuningJobRequest request) { return deleteHyperparameterTuningJobOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a HyperparameterTuningJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteHyperparameterTuningJobOperationCallable().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< DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobOperationCallable() { return stub.deleteHyperparameterTuningJobOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a HyperparameterTuningJob. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.deleteHyperparameterTuningJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteHyperparameterTuningJobCallable() { return stub.deleteHyperparameterTuningJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not @@ -1779,15 +1014,6 @@ public final OperationFuture deleteHyperparamete * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   jobServiceClient.cancelHyperparameterTuningJob(name);
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob to cancel. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1800,7 +1026,7 @@ public final void cancelHyperparameterTuningJob(HyperparameterTuningJobName name cancelHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not @@ -1815,15 +1041,6 @@ public final void cancelHyperparameterTuningJob(HyperparameterTuningJobName name * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   jobServiceClient.cancelHyperparameterTuningJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the HyperparameterTuningJob to cancel. Format: *

`projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1834,7 +1051,7 @@ public final void cancelHyperparameterTuningJob(String name) { cancelHyperparameterTuningJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not @@ -1849,18 +1066,6 @@ public final void cancelHyperparameterTuningJob(String name) { * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   CancelHyperparameterTuningJobRequest request = CancelHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.cancelHyperparameterTuningJob(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 */ @@ -1868,7 +1073,7 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq cancelHyperparameterTuningJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not @@ -1884,39 +1089,17 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq * is set to `CANCELLED`. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
-   *   CancelHyperparameterTuningJobRequest request = CancelHyperparameterTuningJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.cancelHyperparameterTuningJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable cancelHyperparameterTuningJobCallable() { return stub.cancelHyperparameterTuningJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
-   *   BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(parent, batchPredictionJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the BatchPredictionJob in. * Format: `projects/{project}/locations/{location}` * @param batchPredictionJob Required. The BatchPredictionJob to create. @@ -1932,21 +1115,11 @@ public final BatchPredictionJob createBatchPredictionJob( return createBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
-   *   BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(parent.toString(), batchPredictionJob);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the BatchPredictionJob in. * Format: `projects/{project}/locations/{location}` * @param batchPredictionJob Required. The BatchPredictionJob to create. @@ -1962,25 +1135,11 @@ public final BatchPredictionJob createBatchPredictionJob( return createBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
-   *   CreateBatchPredictionJobRequest request = CreateBatchPredictionJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setBatchPredictionJob(batchPredictionJob)
-   *     .build();
-   *   BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(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 */ @@ -1989,45 +1148,22 @@ public final BatchPredictionJob createBatchPredictionJob( return createBatchPredictionJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
-   *   CreateBatchPredictionJobRequest request = CreateBatchPredictionJobRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setBatchPredictionJob(batchPredictionJob)
-   *     .build();
-   *   ApiFuture<BatchPredictionJob> future = jobServiceClient.createBatchPredictionJobCallable().futureCall(request);
-   *   // Do something
-   *   BatchPredictionJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createBatchPredictionJobCallable() { return stub.createBatchPredictionJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a BatchPredictionJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name);
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob resource. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2040,19 +1176,10 @@ public final BatchPredictionJob getBatchPredictionJob(BatchPredictionJobName nam return getBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a BatchPredictionJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob resource. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2063,22 +1190,10 @@ public final BatchPredictionJob getBatchPredictionJob(String name) { return getBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a BatchPredictionJob * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   GetBatchPredictionJobRequest request = GetBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(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 */ @@ -2086,44 +1201,21 @@ public final BatchPredictionJob getBatchPredictionJob(GetBatchPredictionJobReque return getBatchPredictionJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a BatchPredictionJob * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   GetBatchPredictionJobRequest request = GetBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<BatchPredictionJob> future = jobServiceClient.getBatchPredictionJobCallable().futureCall(request);
-   *   // Do something
-   *   BatchPredictionJob response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getBatchPredictionJobCallable() { return stub.getBatchPredictionJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists BatchPredictionJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the BatchPredictionJobs from. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2136,21 +1228,10 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(Locati return listBatchPredictionJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists BatchPredictionJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the BatchPredictionJobs from. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2161,24 +1242,10 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(String return listBatchPredictionJobs(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists BatchPredictionJobs in a Location. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(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 */ @@ -2187,82 +1254,36 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs( return listBatchPredictionJobsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists BatchPredictionJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListBatchPredictionJobsPagedResponse> future = jobServiceClient.listBatchPredictionJobsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (BatchPredictionJob element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listBatchPredictionJobsPagedCallable() { return stub.listBatchPredictionJobsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists BatchPredictionJobs in a Location. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListBatchPredictionJobsResponse response = jobServiceClient.listBatchPredictionJobsCallable().call(request);
-   *     for (BatchPredictionJob element : response.getBatchPredictionJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listBatchPredictionJobsCallable() { return stub.listBatchPredictionJobsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   jobServiceClient.deleteBatchPredictionJobAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob resource to be deleted. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @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 deleteBatchPredictionJobAsync( BatchPredictionJobName name) { DeleteBatchPredictionJobRequest request = @@ -2272,25 +1293,14 @@ public final OperationFuture deleteBatchPredicti return deleteBatchPredictionJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   jobServiceClient.deleteBatchPredictionJobAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob resource to be deleted. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @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 deleteBatchPredictionJobAsync( String name) { DeleteBatchPredictionJobRequest request = @@ -2298,80 +1308,41 @@ public final OperationFuture deleteBatchPredicti return deleteBatchPredictionJobAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.deleteBatchPredictionJobAsync(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 deleteBatchPredictionJobAsync( DeleteBatchPredictionJobRequest request) { return deleteBatchPredictionJobOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteBatchPredictionJobOperationCallable().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 deleteBatchPredictionJobOperationCallable() { return stub.deleteBatchPredictionJobOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.deleteBatchPredictionJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteBatchPredictionJobCallable() { return stub.deleteBatchPredictionJobCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a BatchPredictionJob. * @@ -2384,15 +1355,6 @@ public final OperationFuture deleteBatchPredicti * [BatchPredictionJob.state][google.cloud.aiplatform.v1beta1.BatchPredictionJob.state] is set to * `CANCELLED`. Any files already outputted by the job are not deleted. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   jobServiceClient.cancelBatchPredictionJob(name);
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob to cancel. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2405,7 +1367,7 @@ public final void cancelBatchPredictionJob(BatchPredictionJobName name) { cancelBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a BatchPredictionJob. * @@ -2418,15 +1380,6 @@ public final void cancelBatchPredictionJob(BatchPredictionJobName name) { * [BatchPredictionJob.state][google.cloud.aiplatform.v1beta1.BatchPredictionJob.state] is set to * `CANCELLED`. Any files already outputted by the job are not deleted. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   jobServiceClient.cancelBatchPredictionJob(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the BatchPredictionJob to cancel. Format: *

`projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2437,7 +1390,7 @@ public final void cancelBatchPredictionJob(String name) { cancelBatchPredictionJob(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a BatchPredictionJob. * @@ -2450,18 +1403,6 @@ public final void cancelBatchPredictionJob(String name) { * [BatchPredictionJob.state][google.cloud.aiplatform.v1beta1.BatchPredictionJob.state] is set to * `CANCELLED`. Any files already outputted by the job are not deleted. * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   CancelBatchPredictionJobRequest request = CancelBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   jobServiceClient.cancelBatchPredictionJob(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 */ @@ -2469,7 +1410,7 @@ public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest reque cancelBatchPredictionJobCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a BatchPredictionJob. * @@ -2483,18 +1424,6 @@ public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest reque * `CANCELLED`. Any files already outputted by the job are not deleted. * *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
-   *   CancelBatchPredictionJobRequest request = CancelBatchPredictionJobRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.cancelBatchPredictionJobCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable cancelBatchPredictionJobCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java index bbd456f90..3887fa8f6 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListBatchPredictionJobsPagedResponse; @@ -39,7 +40,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link JobServiceClient}. * @@ -56,23 +57,23 @@ * *

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

- * 
- * JobServiceSettings.Builder jobServiceSettingsBuilder =
- *     JobServiceSettings.newBuilder();
+ * 
{@code
+ * JobServiceSettings.Builder jobServiceSettingsBuilder = JobServiceSettings.newBuilder();
  * jobServiceSettingsBuilder
  *     .createCustomJobSettings()
  *     .setRetrySettings(
- *         jobServiceSettingsBuilder.createCustomJobSettings().getRetrySettings().toBuilder()
+ *         jobServiceSettingsBuilder
+ *             .createCustomJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * JobServiceSettings jobServiceSettings = jobServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class JobServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createCustomJob. */ public UnaryCallSettings createCustomJobSettings() { return ((JobServiceStubSettings) getStubSettings()).createCustomJobSettings(); @@ -96,8 +97,6 @@ public UnaryCallSettings deleteCustomJobSetti } /** Returns the object with the settings used for calls to deleteCustomJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteCustomJobOperationSettings() { return ((JobServiceStubSettings) getStubSettings()).deleteCustomJobOperationSettings(); @@ -136,8 +135,6 @@ public UnaryCallSettings cancelCustomJobSettings( } /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteDataLabelingJobOperationSettings() { return ((JobServiceStubSettings) getStubSettings()).deleteDataLabelingJobOperationSettings(); @@ -176,8 +173,6 @@ public UnaryCallSettings cancelDataLabeling } /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteHyperparameterTuningJobOperationSettings() { return ((JobServiceStubSettings) getStubSettings()) @@ -218,8 +213,6 @@ public UnaryCallSettings cancelDataLabeling } /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteBatchPredictionJobOperationSettings() { return ((JobServiceStubSettings) getStubSettings()).deleteBatchPredictionJobOperationSettings(); @@ -290,18 +283,15 @@ protected JobServiceSettings(Builder settingsBuilder) throws IOException { /** Builder for JobServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(JobServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(JobServiceStubSettings.newBuilder()); - } - protected Builder(JobServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -310,11 +300,15 @@ protected Builder(JobServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(JobServiceStubSettings.newBuilder()); + } + public JobServiceStubSettings.Builder getStubSettingsBuilder() { return ((JobServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -350,8 +344,6 @@ public UnaryCallSettings.Builder deleteCustom } /** Returns the builder for the settings used for calls to deleteCustomJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder deleteCustomJobOperationSettings() { return getStubSettingsBuilder().deleteCustomJobOperationSettings(); @@ -390,8 +382,6 @@ public UnaryCallSettings.Builder cancelCustomJobS } /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> deleteDataLabelingJobOperationSettings() { @@ -432,8 +422,6 @@ public UnaryCallSettings.Builder cancelCustomJobS } /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobOperationSettings() { @@ -474,8 +462,6 @@ public UnaryCallSettings.Builder cancelCustomJobS } /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> deleteBatchPredictionJobOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClient.java index 470ca64be..5631dc8d4 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -37,7 +38,7 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service that migrates resources from automl.googleapis.com, * datalabeling.googleapis.com and ml.googleapis.com to AI Platform. @@ -45,18 +46,7 @@ *

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 (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   for (MigratableResource element : migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
- *     // doThingsWith(element);
- *   }
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the migrationServiceClient object to clean up resources + *

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

To customize credentials: * - *

- * 
+ * 
{@code
  * MigrationServiceSettings migrationServiceSettings =
  *     MigrationServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * MigrationServiceClient migrationServiceClient =
  *     MigrationServiceClient.create(migrationServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * MigrationServiceSettings migrationServiceSettings =
  *     MigrationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * MigrationServiceClient migrationServiceClient =
  *     MigrationServiceClient.create(migrationServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class MigrationServiceClient implements BackgroundResource { private final MigrationServiceSettings settings; private final MigrationServiceStub stub; @@ -130,7 +118,7 @@ public static final MigrationServiceClient create(MigrationServiceSettings setti /** * Constructs an instance of MigrationServiceClient, using the given stub for making calls. This - * is for advanced usage - prefer to use MigrationServiceSettings}. + * is for advanced usage - prefer using create(MigrationServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final MigrationServiceClient create(MigrationServiceStub stub) { @@ -168,28 +156,15 @@ public MigrationServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and * ml.googleapis.com that can be migrated to AI Platform's given location. * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (MigratableResource element : migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The location that the migratable resources should be searched from. * It's the AI Platform location that the resources can be migrated to, not the resources' * original location. Format: `projects/{project}/locations/{location}` @@ -204,22 +179,11 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return searchMigratableResources(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and * ml.googleapis.com that can be migrated to AI Platform's given location. * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (MigratableResource element : migrationServiceClient.searchMigratableResources(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The location that the migratable resources should be searched from. * It's the AI Platform location that the resources can be migrated to, not the resources' * original location. Format: `projects/{project}/locations/{location}` @@ -231,25 +195,11 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(St return searchMigratableResources(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and * ml.googleapis.com that can be migrated to AI Platform's given location. * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SearchMigratableResourcesRequest request = SearchMigratableResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (MigratableResource element : migrationServiceClient.searchMigratableResources(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 */ @@ -258,26 +208,12 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return searchMigratableResourcesPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and * ml.googleapis.com that can be migrated to AI Platform's given location. * *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SearchMigratableResourcesRequest request = SearchMigratableResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<SearchMigratableResourcesPagedResponse> future = migrationServiceClient.searchMigratableResourcesPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (MigratableResource element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable< SearchMigratableResourcesRequest, SearchMigratableResourcesPagedResponse> @@ -285,54 +221,23 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return stub.searchMigratableResourcesPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and * ml.googleapis.com that can be migrated to AI Platform's given location. * *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SearchMigratableResourcesRequest request = SearchMigratableResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     SearchMigratableResourcesResponse response = migrationServiceClient.searchMigratableResourcesCallable().call(request);
-   *     for (MigratableResource element : response.getMigratableResourcesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable searchMigratableResourcesCallable() { return stub.searchMigratableResourcesCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
-   *   BatchMigrateResourcesResponse response = migrationServiceClient.batchMigrateResourcesAsync(parent, migrateResourceRequests).get();
-   * }
-   * 
- * * @param parent Required. The location of the migrated resource will live in. Format: * `projects/{project}/locations/{location}` * @param migrateResourceRequests Required. The request messages specifying the resources to @@ -340,8 +245,6 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * migrated in one batch. * @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< BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> batchMigrateResourcesAsync( @@ -354,21 +257,11 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return batchMigrateResourcesAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
-   *   BatchMigrateResourcesResponse response = migrationServiceClient.batchMigrateResourcesAsync(parent.toString(), migrateResourceRequests).get();
-   * }
-   * 
- * * @param parent Required. The location of the migrated resource will live in. Format: * `projects/{project}/locations/{location}` * @param migrateResourceRequests Required. The request messages specifying the resources to @@ -376,8 +269,6 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * migrated in one batch. * @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< BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> batchMigrateResourcesAsync( @@ -390,58 +281,27 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return batchMigrateResourcesAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * - *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
-   *   BatchMigrateResourcesRequest request = BatchMigrateResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllMigrateResourceRequests(migrateResourceRequests)
-   *     .build();
-   *   BatchMigrateResourcesResponse response = migrationServiceClient.batchMigrateResourcesAsync(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< BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> batchMigrateResourcesAsync(BatchMigrateResourcesRequest request) { return batchMigrateResourcesOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
-   *   BatchMigrateResourcesRequest request = BatchMigrateResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllMigrateResourceRequests(migrateResourceRequests)
-   *     .build();
-   *   OperationFuture<BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> future = migrationServiceClient.batchMigrateResourcesOperationCallable().futureCall(request);
-   *   // Do something
-   *   BatchMigrateResourcesResponse response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< BatchMigrateResourcesRequest, BatchMigrateResourcesResponse, @@ -450,26 +310,12 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( return stub.batchMigrateResourcesOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * *

Sample code: - * - *


-   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
-   *   BatchMigrateResourcesRequest request = BatchMigrateResourcesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllMigrateResourceRequests(migrateResourceRequests)
-   *     .build();
-   *   ApiFuture<Operation> future = migrationServiceClient.batchMigrateResourcesCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable batchMigrateResourcesCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceSettings.java index d252ad08a..37d770f56 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; @@ -35,7 +36,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link MigrationServiceClient}. * @@ -52,23 +53,24 @@ * *

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

- * 
+ * 
{@code
  * MigrationServiceSettings.Builder migrationServiceSettingsBuilder =
  *     MigrationServiceSettings.newBuilder();
  * migrationServiceSettingsBuilder
  *     .searchMigratableResourcesSettings()
  *     .setRetrySettings(
- *         migrationServiceSettingsBuilder.searchMigratableResourcesSettings().getRetrySettings().toBuilder()
+ *         migrationServiceSettingsBuilder
+ *             .searchMigratableResourcesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * MigrationServiceSettings migrationServiceSettings = migrationServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class MigrationServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to searchMigratableResources. */ public PagedCallSettings< SearchMigratableResourcesRequest, @@ -85,8 +87,6 @@ public class MigrationServiceSettings extends ClientSettings { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(MigrationServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(MigrationServiceStubSettings.newBuilder()); - } - protected Builder(MigrationServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -176,11 +173,15 @@ protected Builder(MigrationServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(MigrationServiceStubSettings.newBuilder()); + } + public MigrationServiceStubSettings.Builder getStubSettingsBuilder() { return ((MigrationServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -209,8 +210,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to batchMigrateResources. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< BatchMigrateResourcesRequest, BatchMigrateResourcesResponse, diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java index 8374c77ec..1011361a2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -39,23 +40,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service for managing AI Platform's machine learning Models. * *

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 (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
- *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
- *   Model response = modelServiceClient.getModel(name);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the modelServiceClient object to clean up resources such + *

Note: close() needs to be called on the ModelServiceClient 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 @@ -83,30 +75,26 @@ * *

To customize credentials: * - *

- * 
+ * 
{@code
  * ModelServiceSettings modelServiceSettings =
  *     ModelServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
- * ModelServiceClient modelServiceClient =
- *     ModelServiceClient.create(modelServiceSettings);
- * 
- * 
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings); + * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * ModelServiceSettings modelServiceSettings =
  *     ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ModelServiceClient modelServiceClient =
- *     ModelServiceClient.create(modelServiceSettings);
- * 
- * 
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings); + * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class ModelServiceClient implements BackgroundResource { private final ModelServiceSettings settings; private final ModelServiceStub stub; @@ -127,7 +115,7 @@ public static final ModelServiceClient create(ModelServiceSettings settings) thr /** * Constructs an instance of ModelServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use ModelServiceSettings}. + * for advanced usage - prefer using create(ModelServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final ModelServiceClient create(ModelServiceStub stub) { @@ -165,33 +153,19 @@ public ModelServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Uploads a Model artifact into AI Platform. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   UploadModelResponse response = modelServiceClient.uploadModelAsync(parent, model).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location into which to upload the Model. * Format: `projects/{project}/locations/{location}` * @param model Required. 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 uploadModelAsync( LocationName parent, Model model) { UploadModelRequest request = @@ -202,27 +176,15 @@ public final OperationFuture return uploadModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Uploads a Model artifact into AI Platform. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   UploadModelResponse response = modelServiceClient.uploadModelAsync(parent.toString(), model).get();
-   * }
-   * 
- * * @param parent Required. The resource name of the Location into which to upload the Model. * Format: `projects/{project}/locations/{location}` * @param model Required. 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 uploadModelAsync( String parent, Model model) { UploadModelRequest request = @@ -230,98 +192,44 @@ public final OperationFuture return uploadModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Uploads a Model artifact into AI Platform. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   UploadModelRequest request = UploadModelRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setModel(model)
-   *     .build();
-   *   UploadModelResponse response = modelServiceClient.uploadModelAsync(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 uploadModelAsync( UploadModelRequest request) { return uploadModelOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Uploads a Model artifact into AI Platform. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   UploadModelRequest request = UploadModelRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setModel(model)
-   *     .build();
-   *   OperationFuture<UploadModelResponse, UploadModelOperationMetadata> future = modelServiceClient.uploadModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   UploadModelResponse response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> uploadModelOperationCallable() { return stub.uploadModelOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Uploads a Model artifact into AI Platform. * *

Sample code: - * - *


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

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Model response = modelServiceClient.getModel(name);
-   * }
-   * 
- * * @param name Required. The name of the Model resource. Format: * `projects/{project}/locations/{location}/models/{model}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -332,19 +240,10 @@ public final Model getModel(ModelName name) { return getModel(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Model. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Model response = modelServiceClient.getModel(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the Model resource. Format: * `projects/{project}/locations/{location}/models/{model}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -354,22 +253,10 @@ public final Model getModel(String name) { return getModel(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Model. * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the Models from. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -424,21 +288,10 @@ public final ListModelsPagedResponse listModels(LocationName parent) { return listModels(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Models in a Location. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Model element : modelServiceClient.listModels(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the Models from. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -448,24 +301,10 @@ public final ListModelsPagedResponse listModels(String parent) { return listModels(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Models in a Location. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListModelsRequest request = ListModelsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (Model element : modelServiceClient.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 */ @@ -473,75 +312,30 @@ public final ListModelsPagedResponse listModels(ListModelsRequest request) { return listModelsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Models in a Location. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListModelsRequest request = ListModelsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListModelsPagedResponse> future = modelServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Models in a Location. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListModelsRequest request = ListModelsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListModelsResponse response = modelServiceClient.listModelsCallable().call(request);
-   *     for (Model element : response.getModelsList()) {
-   *       // 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a Model. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   Model model = Model.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Model response = modelServiceClient.updateModel(model, updateMask);
-   * }
-   * 
- * * @param model Required. The Model which replaces the resource on the server. * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` * definition, see @@ -555,24 +349,10 @@ public final Model updateModel(Model model, FieldMask updateMask) { return updateModel(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a Model. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   Model model = Model.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateModelRequest request = UpdateModelRequest.newBuilder()
-   *     .setModel(model)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   Model response = modelServiceClient.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 */ @@ -580,179 +360,92 @@ public final Model updateModel(UpdateModelRequest request) { return updateModelCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a Model. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   Model model = Model.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateModelRequest request = UpdateModelRequest.newBuilder()
-   *     .setModel(model)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Model> future = modelServiceClient.updateModelCallable().futureCall(request);
-   *   // Do something
-   *   Model response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateModelCallable() { return stub.updateModelCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   modelServiceClient.deleteModelAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the Model resource to be deleted. Format: * `projects/{project}/locations/{location}/models/{model}` * @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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   modelServiceClient.deleteModelAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the Model resource to be deleted. Format: * `projects/{project}/locations/{location}/models/{model}` * @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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   modelServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = modelServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = modelServiceClient.deleteModelCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteModelCallable() { return stub.deleteModelCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports a trained, exportable, Model to a location specified by the user. A Model is considered * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build();
-   *   ExportModelResponse response = modelServiceClient.exportModelAsync(name, outputConfig).get();
-   * }
-   * 
- * * @param name Required. The resource name of the Model to export. Format: * `projects/{project}/locations/{location}/models/{model}` * @param outputConfig Required. The desired output location and configuration. * @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 exportModelAsync( ModelName name, ExportModelRequest.OutputConfig outputConfig) { ExportModelRequest request = @@ -763,29 +456,17 @@ public final OperationFuture return exportModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports a trained, exportable, Model to a location specified by the user. A Model is considered * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build();
-   *   ExportModelResponse response = modelServiceClient.exportModelAsync(name.toString(), outputConfig).get();
-   * }
-   * 
- * * @param name Required. The resource name of the Model to export. Format: * `projects/{project}/locations/{location}/models/{model}` * @param outputConfig Required. The desired output location and configuration. * @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 exportModelAsync( String name, ExportModelRequest.OutputConfig outputConfig) { ExportModelRequest request = @@ -793,104 +474,50 @@ public final OperationFuture return exportModelAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports a trained, exportable, Model to a location specified by the user. A Model is considered * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ExportModelResponse response = modelServiceClient.exportModelAsync(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 exportModelAsync( ExportModelRequest request) { return exportModelOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports a trained, exportable, Model to a location specified by the user. A Model is considered * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   OperationFuture<ExportModelResponse, ExportModelOperationMetadata> future = modelServiceClient.exportModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   ExportModelResponse response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> exportModelOperationCallable() { return stub.exportModelOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports a trained, exportable, Model to a location specified by the user. A Model is considered * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = modelServiceClient.exportModelCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable exportModelCallable() { return stub.exportModelCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   ModelEvaluation response = modelServiceClient.getModelEvaluation(name);
-   * }
-   * 
- * * @param name Required. The name of the ModelEvaluation resource. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -903,19 +530,10 @@ public final ModelEvaluation getModelEvaluation(ModelEvaluationName name) { return getModelEvaluation(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   ModelEvaluation response = modelServiceClient.getModelEvaluation(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the ModelEvaluation resource. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -926,22 +544,10 @@ public final ModelEvaluation getModelEvaluation(String name) { return getModelEvaluation(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   GetModelEvaluationRequest request = GetModelEvaluationRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ModelEvaluation response = modelServiceClient.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 */ @@ -949,44 +555,21 @@ public final ModelEvaluation getModelEvaluation(GetModelEvaluationRequest reques return getModelEvaluationCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. * *

Sample code: - * - *


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

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : modelServiceClient.listModelEvaluations(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Model to list the ModelEvaluations from. * Format: `projects/{project}/locations/{location}/models/{model}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -999,21 +582,10 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations(ModelName pa return listModelEvaluations(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluations in a Model. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : modelServiceClient.listModelEvaluations(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Model to list the ModelEvaluations from. * Format: `projects/{project}/locations/{location}/models/{model}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1024,24 +596,10 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations(String paren return listModelEvaluations(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluations in a Model. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (ModelEvaluation element : modelServiceClient.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 */ @@ -1050,76 +608,32 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations( return listModelEvaluationsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluations in a Model. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListModelEvaluationsPagedResponse> future = modelServiceClient.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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluations in a Model. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListModelEvaluationsResponse response = modelServiceClient.listModelEvaluationsCallable().call(request);
-   *     for (ModelEvaluation element : response.getModelEvaluationsList()) {
-   *       // 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(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluationSlice. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationSliceName name = ModelEvaluationSliceName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
-   *   ModelEvaluationSlice response = modelServiceClient.getModelEvaluationSlice(name);
-   * }
-   * 
- * * @param name Required. The name of the ModelEvaluationSlice resource. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1132,19 +646,10 @@ public final ModelEvaluationSlice getModelEvaluationSlice(ModelEvaluationSliceNa return getModelEvaluationSlice(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluationSlice. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationSliceName name = ModelEvaluationSliceName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
-   *   ModelEvaluationSlice response = modelServiceClient.getModelEvaluationSlice(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the ModelEvaluationSlice resource. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1155,22 +660,10 @@ public final ModelEvaluationSlice getModelEvaluationSlice(String name) { return getModelEvaluationSlice(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluationSlice. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationSliceName name = ModelEvaluationSliceName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
-   *   GetModelEvaluationSliceRequest request = GetModelEvaluationSliceRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ModelEvaluationSlice response = modelServiceClient.getModelEvaluationSlice(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 */ @@ -1179,44 +672,21 @@ public final ModelEvaluationSlice getModelEvaluationSlice( return getModelEvaluationSliceCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluationSlice. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationSliceName name = ModelEvaluationSliceName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
-   *   GetModelEvaluationSliceRequest request = GetModelEvaluationSliceRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<ModelEvaluationSlice> future = modelServiceClient.getModelEvaluationSliceCallable().futureCall(request);
-   *   // Do something
-   *   ModelEvaluationSlice response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getModelEvaluationSliceCallable() { return stub.getModelEvaluationSliceCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluationSlices in a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   for (ModelEvaluationSlice element : modelServiceClient.listModelEvaluationSlices(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the ModelEvaluation to list the * ModelEvaluationSlices from. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` @@ -1231,21 +701,10 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( return listModelEvaluationSlices(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluationSlices in a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   for (ModelEvaluationSlice element : modelServiceClient.listModelEvaluationSlices(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the ModelEvaluation to list the * ModelEvaluationSlices from. Format: *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` @@ -1257,24 +716,10 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices(St return listModelEvaluationSlices(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluationSlices in a ModelEvaluation. * - *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   ListModelEvaluationSlicesRequest request = ListModelEvaluationSlicesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (ModelEvaluationSlice element : modelServiceClient.listModelEvaluationSlices(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 */ @@ -1283,25 +728,11 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( return listModelEvaluationSlicesPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluationSlices in a ModelEvaluation. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   ListModelEvaluationSlicesRequest request = ListModelEvaluationSlicesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListModelEvaluationSlicesPagedResponse> future = modelServiceClient.listModelEvaluationSlicesPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (ModelEvaluationSlice element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable< ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesPagedResponse> @@ -1309,32 +740,11 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( return stub.listModelEvaluationSlicesPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ModelEvaluationSlices in a ModelEvaluation. * *

Sample code: - * - *


-   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
-   *   ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
-   *   ListModelEvaluationSlicesRequest request = ListModelEvaluationSlicesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListModelEvaluationSlicesResponse response = modelServiceClient.listModelEvaluationSlicesCallable().call(request);
-   *     for (ModelEvaluationSlice element : response.getModelEvaluationSlicesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listModelEvaluationSlicesCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java index b8ef4598b..333a9ee9b 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; @@ -38,7 +39,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link ModelServiceClient}. * @@ -55,31 +56,29 @@ * *

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

- * 
- * ModelServiceSettings.Builder modelServiceSettingsBuilder =
- *     ModelServiceSettings.newBuilder();
+ * 
{@code
+ * ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
  * modelServiceSettingsBuilder
  *     .getModelSettings()
  *     .setRetrySettings(
- *         modelServiceSettingsBuilder.getModelSettings().getRetrySettings().toBuilder()
+ *         modelServiceSettingsBuilder
+ *             .getModelSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class ModelServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to uploadModel. */ public UnaryCallSettings uploadModelSettings() { return ((ModelServiceStubSettings) getStubSettings()).uploadModelSettings(); } /** Returns the object with the settings used for calls to uploadModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> uploadModelOperationSettings() { @@ -108,8 +107,6 @@ public UnaryCallSettings 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 ((ModelServiceStubSettings) getStubSettings()).deleteModelOperationSettings(); @@ -121,8 +118,6 @@ public UnaryCallSettings exportModelSettings() { } /** Returns the object with the settings used for calls to exportModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> exportModelOperationSettings() { @@ -219,18 +214,15 @@ protected ModelServiceSettings(Builder settingsBuilder) throws IOException { /** Builder for ModelServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(ModelServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(ModelServiceStubSettings.newBuilder()); - } - protected Builder(ModelServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -239,11 +231,15 @@ protected Builder(ModelServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(ModelServiceStubSettings.newBuilder()); + } + public ModelServiceStubSettings.Builder getStubSettingsBuilder() { return ((ModelServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -262,8 +258,6 @@ public UnaryCallSettings.Builder uploadModelSetti } /** Returns the builder for the settings used for calls to uploadModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> uploadModelOperationSettings() { @@ -292,8 +286,6 @@ public UnaryCallSettings.Builder deleteModelSetti } /** 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(); @@ -305,8 +297,6 @@ public UnaryCallSettings.Builder exportModelSetti } /** Returns the builder for the settings used for calls to exportModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> exportModelOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java index 5d0cd4fd3..a803a8a6a 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -38,24 +39,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service for creating and managing AI Platform's pipelines. * *

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 (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
- *   TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the pipelineServiceClient object to clean up resources + *

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

To customize credentials: * - *

- * 
+ * 
{@code
  * PipelineServiceSettings pipelineServiceSettings =
  *     PipelineServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * PipelineServiceClient pipelineServiceClient =
  *     PipelineServiceClient.create(pipelineServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * PipelineServiceSettings pipelineServiceSettings =
  *     PipelineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * PipelineServiceClient pipelineServiceClient =
  *     PipelineServiceClient.create(pipelineServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class PipelineServiceClient implements BackgroundResource { private final PipelineServiceSettings settings; private final PipelineServiceStub stub; @@ -129,7 +118,7 @@ public static final PipelineServiceClient create(PipelineServiceSettings setting /** * Constructs an instance of PipelineServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use PipelineServiceSettings}. + * for advanced usage - prefer using create(PipelineServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final PipelineServiceClient create(PipelineServiceStub stub) { @@ -167,26 +156,14 @@ public PipelineServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
-   *   TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the TrainingPipeline in. * Format: `projects/{project}/locations/{location}` * @param trainingPipeline Required. The TrainingPipeline to create. @@ -202,20 +179,10 @@ public final TrainingPipeline createTrainingPipeline( return createTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
-   *   TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent.toString(), trainingPipeline);
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to create the TrainingPipeline in. * Format: `projects/{project}/locations/{location}` * @param trainingPipeline Required. The TrainingPipeline to create. @@ -231,24 +198,10 @@ public final TrainingPipeline createTrainingPipeline( return createTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
-   *   CreateTrainingPipelineRequest request = CreateTrainingPipelineRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTrainingPipeline(trainingPipeline)
-   *     .build();
-   *   TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(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 */ @@ -256,44 +209,21 @@ public final TrainingPipeline createTrainingPipeline(CreateTrainingPipelineReque return createTrainingPipelineCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
-   *   CreateTrainingPipelineRequest request = CreateTrainingPipelineRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTrainingPipeline(trainingPipeline)
-   *     .build();
-   *   ApiFuture<TrainingPipeline> future = pipelineServiceClient.createTrainingPipelineCallable().futureCall(request);
-   *   // Do something
-   *   TrainingPipeline response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createTrainingPipelineCallable() { return stub.createTrainingPipelineCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(name);
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline resource. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -306,19 +236,10 @@ public final TrainingPipeline getTrainingPipeline(TrainingPipelineName name) { return getTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline resource. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -329,22 +250,10 @@ public final TrainingPipeline getTrainingPipeline(String name) { return getTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   GetTrainingPipelineRequest request = GetTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(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 */ @@ -352,44 +261,21 @@ public final TrainingPipeline getTrainingPipeline(GetTrainingPipelineRequest req return getTrainingPipelineCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a TrainingPipeline. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   GetTrainingPipelineRequest request = GetTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<TrainingPipeline> future = pipelineServiceClient.getTrainingPipelineCallable().futureCall(request);
-   *   // Do something
-   *   TrainingPipeline response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getTrainingPipelineCallable() { return stub.getTrainingPipelineCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TrainingPipelines in a Location. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the TrainingPipelines from. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -402,21 +288,10 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines(LocationNa return listTrainingPipelines(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TrainingPipelines in a Location. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The resource name of the Location to list the TrainingPipelines from. * Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -427,24 +302,10 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines(String par return listTrainingPipelines(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TrainingPipelines in a Location. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(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 */ @@ -453,82 +314,36 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines( return listTrainingPipelinesPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TrainingPipelines in a Location. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListTrainingPipelinesPagedResponse> future = pipelineServiceClient.listTrainingPipelinesPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (TrainingPipeline element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listTrainingPipelinesPagedCallable() { return stub.listTrainingPipelinesPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TrainingPipelines in a Location. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListTrainingPipelinesResponse response = pipelineServiceClient.listTrainingPipelinesCallable().call(request);
-   *     for (TrainingPipeline element : response.getTrainingPipelinesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listTrainingPipelinesCallable() { return stub.listTrainingPipelinesCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   pipelineServiceClient.deleteTrainingPipelineAsync(name).get();
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline resource to be deleted. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @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 deleteTrainingPipelineAsync( TrainingPipelineName name) { DeleteTrainingPipelineRequest request = @@ -538,25 +353,14 @@ public final OperationFuture deleteTrainingPipel return deleteTrainingPipelineAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   pipelineServiceClient.deleteTrainingPipelineAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline resource to be deleted. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @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 deleteTrainingPipelineAsync( String name) { DeleteTrainingPipelineRequest request = @@ -564,80 +368,41 @@ public final OperationFuture deleteTrainingPipel return deleteTrainingPipelineAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a TrainingPipeline. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   pipelineServiceClient.deleteTrainingPipelineAsync(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 deleteTrainingPipelineAsync( DeleteTrainingPipelineRequest request) { return deleteTrainingPipelineOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a TrainingPipeline. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = pipelineServiceClient.deleteTrainingPipelineOperationCallable().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 deleteTrainingPipelineOperationCallable() { return stub.deleteTrainingPipelineOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a TrainingPipeline. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = pipelineServiceClient.deleteTrainingPipelineCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteTrainingPipelineCallable() { return stub.deleteTrainingPipelineCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The * server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can @@ -651,15 +416,6 @@ public final OperationFuture deleteTrainingPipel * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   pipelineServiceClient.cancelTrainingPipeline(name);
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline to cancel. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -672,7 +428,7 @@ public final void cancelTrainingPipeline(TrainingPipelineName name) { cancelTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The * server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can @@ -686,15 +442,6 @@ public final void cancelTrainingPipeline(TrainingPipelineName name) { * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   pipelineServiceClient.cancelTrainingPipeline(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the TrainingPipeline to cancel. Format: *

`projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -705,7 +452,7 @@ public final void cancelTrainingPipeline(String name) { cancelTrainingPipeline(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The * server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can @@ -719,18 +466,6 @@ public final void cancelTrainingPipeline(String name) { * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * - *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   CancelTrainingPipelineRequest request = CancelTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   pipelineServiceClient.cancelTrainingPipeline(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 */ @@ -738,7 +473,7 @@ public final void cancelTrainingPipeline(CancelTrainingPipelineRequest request) cancelTrainingPipelineCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The * server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can @@ -753,18 +488,6 @@ public final void cancelTrainingPipeline(CancelTrainingPipelineRequest request) * `CANCELLED`. * *

Sample code: - * - *


-   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
-   *   TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
-   *   CancelTrainingPipelineRequest request = CancelTrainingPipelineRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = pipelineServiceClient.cancelTrainingPipelineCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable cancelTrainingPipelineCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java index c7f02280c..9672468ae 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; @@ -36,7 +37,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link PipelineServiceClient}. * @@ -53,23 +54,24 @@ * *

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

- * 
+ * 
{@code
  * PipelineServiceSettings.Builder pipelineServiceSettingsBuilder =
  *     PipelineServiceSettings.newBuilder();
  * pipelineServiceSettingsBuilder
  *     .createTrainingPipelineSettings()
  *     .setRetrySettings(
- *         pipelineServiceSettingsBuilder.createTrainingPipelineSettings().getRetrySettings().toBuilder()
+ *         pipelineServiceSettingsBuilder
+ *             .createTrainingPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PipelineServiceSettings pipelineServiceSettings = pipelineServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class PipelineServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createTrainingPipeline. */ public UnaryCallSettings createTrainingPipelineSettings() { @@ -98,8 +100,6 @@ public class PipelineServiceSettings extends ClientSettings deleteTrainingPipelineOperationSettings() { return ((PipelineServiceStubSettings) getStubSettings()) @@ -171,18 +171,15 @@ protected PipelineServiceSettings(Builder settingsBuilder) throws IOException { /** Builder for PipelineServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(PipelineServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(PipelineServiceStubSettings.newBuilder()); - } - protected Builder(PipelineServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -191,11 +188,15 @@ protected Builder(PipelineServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(PipelineServiceStubSettings.newBuilder()); + } + public PipelineServiceStubSettings.Builder getStubSettingsBuilder() { return ((PipelineServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -236,8 +237,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to deleteTrainingPipeline. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeleteTrainingPipelineRequest, Empty, DeleteOperationMetadata> deleteTrainingPipelineOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java index e0abbc701..88ead5820 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -26,25 +27,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service for online predictions and explanations. * *

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()) {
- *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List<Value> instances = new ArrayList<>();
- *   Value parameters = Value.newBuilder().build();
- *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the predictionServiceClient object to clean up resources + *

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(). * @@ -73,30 +63,28 @@ * *

To customize credentials: * - *

- * 
+ * 
{@code
  * PredictionServiceSettings predictionServiceSettings =
  *     PredictionServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * PredictionServiceClient predictionServiceClient =
  *     PredictionServiceClient.create(predictionServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * PredictionServiceSettings predictionServiceSettings =
  *     PredictionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * PredictionServiceClient predictionServiceClient =
  *     PredictionServiceClient.create(predictionServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class PredictionServiceClient implements BackgroundResource { private final PredictionServiceSettings settings; private final PredictionServiceStub stub; @@ -117,7 +105,7 @@ public static final PredictionServiceClient create(PredictionServiceSettings set /** * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This - * is for advanced usage - prefer to use PredictionServiceSettings}. + * is for advanced usage - prefer using create(PredictionServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final PredictionServiceClient create(PredictionServiceStub stub) { @@ -149,21 +137,10 @@ public PredictionServiceStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online prediction. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().build();
-   *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param instances Required. The instances that are the input to the prediction call. A @@ -192,21 +169,10 @@ public final PredictResponse predict( return predict(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online prediction. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().build();
-   *   PredictResponse response = predictionServiceClient.predict(endpoint.toString(), instances, parameters);
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param instances Required. The instances that are the input to the prediction call. A @@ -234,24 +200,10 @@ public final PredictResponse predict(String endpoint, List instances, Val return predict(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online prediction. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   PredictRequest request = PredictRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .addAllInstances(instances)
-   *     .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 */ @@ -259,31 +211,17 @@ public final PredictResponse predict(PredictRequest request) { return predictCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online prediction. * *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   PredictRequest request = PredictRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .addAllInstances(instances)
-   *     .build();
-   *   ApiFuture<PredictResponse> future = predictionServiceClient.predictCallable().futureCall(request);
-   *   // Do something
-   *   PredictResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable predictCallable() { return stub.predictCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online explanation. * @@ -295,18 +233,6 @@ public final UnaryCallable predictCallable() { * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().build();
-   *   String deployedModelId = "";
-   *   ExplainResponse response = predictionServiceClient.explain(endpoint, instances, parameters, deployedModelId);
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param instances Required. The instances that are the input to the explanation call. A @@ -339,7 +265,7 @@ public final ExplainResponse explain( return explain(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online explanation. * @@ -351,18 +277,6 @@ public final ExplainResponse explain( * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().build();
-   *   String deployedModelId = "";
-   *   ExplainResponse response = predictionServiceClient.explain(endpoint.toString(), instances, parameters, deployedModelId);
-   * }
-   * 
- * * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param instances Required. The instances that are the input to the explanation call. A @@ -395,7 +309,7 @@ public final ExplainResponse explain( return explain(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online explanation. * @@ -407,20 +321,6 @@ public final ExplainResponse explain( * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   ExplainRequest request = ExplainRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .addAllInstances(instances)
-   *     .build();
-   *   ExplainResponse response = predictionServiceClient.explain(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 */ @@ -428,7 +328,7 @@ public final ExplainResponse explain(ExplainRequest request) { return explainCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an online explanation. * @@ -441,20 +341,6 @@ public final ExplainResponse explain(ExplainRequest request) { * Only deployed AutoML tabular Models have explanation_spec. * *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List<Value> instances = new ArrayList<>();
-   *   ExplainRequest request = ExplainRequest.newBuilder()
-   *     .setEndpoint(endpoint.toString())
-   *     .addAllInstances(instances)
-   *     .build();
-   *   ApiFuture<ExplainResponse> future = predictionServiceClient.explainCallable().futureCall(request);
-   *   // Do something
-   *   ExplainResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable explainCallable() { return stub.explainCallable(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java index f99d03732..d094cbc0c 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -30,7 +31,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link PredictionServiceClient}. * @@ -47,23 +48,24 @@ * *

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

- * 
+ * 
{@code
  * PredictionServiceSettings.Builder predictionServiceSettingsBuilder =
  *     PredictionServiceSettings.newBuilder();
  * predictionServiceSettingsBuilder
  *     .predictSettings()
  *     .setRetrySettings(
- *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
+ *         predictionServiceSettingsBuilder
+ *             .predictSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class PredictionServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to predict. */ public UnaryCallSettings predictSettings() { return ((PredictionServiceStubSettings) getStubSettings()).predictSettings(); @@ -134,18 +136,15 @@ protected PredictionServiceSettings(Builder settingsBuilder) throws IOException /** Builder for PredictionServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + 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()); } @@ -154,11 +153,15 @@ protected Builder(PredictionServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(PredictionServiceStubSettings.newBuilder()); + } + public PredictionServiceStubSettings.Builder getStubSettingsBuilder() { return ((PredictionServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClient.java index f2bb74c56..8723b96b1 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClient.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.ApiFunction; @@ -39,7 +40,7 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: A service for creating and managing Customer SpecialistPools. When customers * start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists @@ -50,16 +51,7 @@ *

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 (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
- *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
- *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
- * }
- * 
- * 
- * - *

Note: close() needs to be called on the specialistPoolServiceClient object to clean up + *

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

To customize credentials: * - *

- * 
+ * 
{@code
  * SpecialistPoolServiceSettings specialistPoolServiceSettings =
  *     SpecialistPoolServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * SpecialistPoolServiceClient specialistPoolServiceClient =
  *     SpecialistPoolServiceClient.create(specialistPoolServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * SpecialistPoolServiceSettings specialistPoolServiceSettings =
  *     SpecialistPoolServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * SpecialistPoolServiceClient specialistPoolServiceClient =
  *     SpecialistPoolServiceClient.create(specialistPoolServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class SpecialistPoolServiceClient implements BackgroundResource { private final SpecialistPoolServiceSettings settings; private final SpecialistPoolServiceStub stub; @@ -133,7 +123,7 @@ public static final SpecialistPoolServiceClient create(SpecialistPoolServiceSett /** * Constructs an instance of SpecialistPoolServiceClient, using the given stub for making calls. - * This is for advanced usage - prefer to use SpecialistPoolServiceSettings}. + * This is for advanced usage - prefer using create(SpecialistPoolServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final SpecialistPoolServiceClient create(SpecialistPoolServiceStub stub) { @@ -171,33 +161,19 @@ public SpecialistPoolServiceStub getStub() { * 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 + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   SpecialistPool response = specialistPoolServiceClient.createSpecialistPoolAsync(parent, specialistPool).get();
-   * }
-   * 
- * * @param parent Required. The parent Project name for the new SpecialistPool. The form is * `projects/{project}/locations/{location}`. * @param specialistPool Required. The SpecialistPool 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 createSpecialistPoolAsync(LocationName parent, SpecialistPool specialistPool) { CreateSpecialistPoolRequest request = @@ -208,27 +184,15 @@ public final OperationsClient getOperationsClient() { return createSpecialistPoolAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   SpecialistPool response = specialistPoolServiceClient.createSpecialistPoolAsync(parent.toString(), specialistPool).get();
-   * }
-   * 
- * * @param parent Required. The parent Project name for the new SpecialistPool. The form is * `projects/{project}/locations/{location}`. * @param specialistPool Required. The SpecialistPool 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 createSpecialistPoolAsync(String parent, SpecialistPool specialistPool) { CreateSpecialistPoolRequest request = @@ -239,99 +203,45 @@ public final OperationsClient getOperationsClient() { return createSpecialistPoolAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   CreateSpecialistPoolRequest request = CreateSpecialistPoolRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setSpecialistPool(specialistPool)
-   *     .build();
-   *   SpecialistPool response = specialistPoolServiceClient.createSpecialistPoolAsync(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 createSpecialistPoolAsync(CreateSpecialistPoolRequest request) { return createSpecialistPoolOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SpecialistPool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   CreateSpecialistPoolRequest request = CreateSpecialistPoolRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setSpecialistPool(specialistPool)
-   *     .build();
-   *   OperationFuture<SpecialistPool, CreateSpecialistPoolOperationMetadata> future = specialistPoolServiceClient.createSpecialistPoolOperationCallable().futureCall(request);
-   *   // Do something
-   *   SpecialistPool response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationCallable() { return stub.createSpecialistPoolOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SpecialistPool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   CreateSpecialistPoolRequest request = CreateSpecialistPoolRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setSpecialistPool(specialistPool)
-   *     .build();
-   *   ApiFuture<Operation> future = specialistPoolServiceClient.createSpecialistPoolCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createSpecialistPoolCallable() { return stub.createSpecialistPoolCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
-   * }
-   * 
- * * @param name Required. The name of the SpecialistPool resource. The form is *

`projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -344,19 +254,10 @@ public final SpecialistPool getSpecialistPool(SpecialistPoolName name) { return getSpecialistPool(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the SpecialistPool resource. The form is *

`projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -366,22 +267,10 @@ public final SpecialistPool getSpecialistPool(String name) { return getSpecialistPool(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   GetSpecialistPoolRequest request = GetSpecialistPoolRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(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 */ @@ -389,43 +278,20 @@ public final SpecialistPool getSpecialistPool(GetSpecialistPoolRequest request) return getSpecialistPoolCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SpecialistPool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   GetSpecialistPoolRequest request = GetSpecialistPoolRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<SpecialistPool> future = specialistPoolServiceClient.getSpecialistPoolCallable().futureCall(request);
-   *   // Do something
-   *   SpecialistPool response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getSpecialistPoolCallable() { return stub.getSpecialistPoolCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SpecialistPools in a Location. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (SpecialistPool element : specialistPoolServiceClient.listSpecialistPools(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The name of the SpecialistPool's parent resource. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -438,21 +304,10 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools(LocationName p return listSpecialistPools(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SpecialistPools in a Location. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (SpecialistPool element : specialistPoolServiceClient.listSpecialistPools(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. The name of the SpecialistPool's parent resource. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -463,24 +318,10 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools(String parent) return listSpecialistPools(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SpecialistPools in a Location. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListSpecialistPoolsRequest request = ListSpecialistPoolsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (SpecialistPool element : specialistPoolServiceClient.listSpecialistPools(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 */ @@ -489,82 +330,36 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools( return listSpecialistPoolsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SpecialistPools in a Location. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListSpecialistPoolsRequest request = ListSpecialistPoolsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListSpecialistPoolsPagedResponse> future = specialistPoolServiceClient.listSpecialistPoolsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (SpecialistPool element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listSpecialistPoolsPagedCallable() { return stub.listSpecialistPoolsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SpecialistPools in a Location. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListSpecialistPoolsRequest request = ListSpecialistPoolsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListSpecialistPoolsResponse response = specialistPoolServiceClient.listSpecialistPoolsCallable().call(request);
-   *     for (SpecialistPool element : response.getSpecialistPoolsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listSpecialistPoolsCallable() { return stub.listSpecialistPoolsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SpecialistPool as well as all Specialists in the pool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   specialistPoolServiceClient.deleteSpecialistPoolAsync(name).get();
-   * }
-   * 
- * * @param name Required. The resource name of the SpecialistPool to delete. Format: * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` * @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 deleteSpecialistPoolAsync( SpecialistPoolName name) { DeleteSpecialistPoolRequest request = @@ -574,25 +369,14 @@ public final OperationFuture deleteSpecialistPoo return deleteSpecialistPoolAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SpecialistPool as well as all Specialists in the pool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   specialistPoolServiceClient.deleteSpecialistPoolAsync(name.toString()).get();
-   * }
-   * 
- * * @param name Required. The resource name of the SpecialistPool to delete. Format: * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` * @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 deleteSpecialistPoolAsync( String name) { DeleteSpecialistPoolRequest request = @@ -600,99 +384,48 @@ public final OperationFuture deleteSpecialistPoo return deleteSpecialistPoolAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SpecialistPool as well as all Specialists in the pool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   DeleteSpecialistPoolRequest request = DeleteSpecialistPoolRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   specialistPoolServiceClient.deleteSpecialistPoolAsync(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 deleteSpecialistPoolAsync( DeleteSpecialistPoolRequest request) { return deleteSpecialistPoolOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SpecialistPool as well as all Specialists in the pool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   DeleteSpecialistPoolRequest request = DeleteSpecialistPoolRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, DeleteOperationMetadata> future = specialistPoolServiceClient.deleteSpecialistPoolOperationCallable().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 deleteSpecialistPoolOperationCallable() { return stub.deleteSpecialistPoolOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SpecialistPool as well as all Specialists in the pool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
-   *   DeleteSpecialistPoolRequest request = DeleteSpecialistPoolRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = specialistPoolServiceClient.deleteSpecialistPoolCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteSpecialistPoolCallable() { return stub.deleteSpecialistPoolCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   SpecialistPool response = specialistPoolServiceClient.updateSpecialistPoolAsync(specialistPool, updateMask).get();
-   * }
-   * 
- * * @param specialistPool Required. The SpecialistPool 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 */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture updateSpecialistPoolAsync(SpecialistPool specialistPool, FieldMask updateMask) { UpdateSpecialistPoolRequest request = @@ -703,80 +436,35 @@ public final OperationFuture deleteSpecialistPoo return updateSpecialistPoolAsync(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SpecialistPool. * - *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateSpecialistPoolRequest request = UpdateSpecialistPoolRequest.newBuilder()
-   *     .setSpecialistPool(specialistPool)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   SpecialistPool response = specialistPoolServiceClient.updateSpecialistPoolAsync(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 updateSpecialistPoolAsync(UpdateSpecialistPoolRequest request) { return updateSpecialistPoolOperationCallable().futureCall(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SpecialistPool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateSpecialistPoolRequest request = UpdateSpecialistPoolRequest.newBuilder()
-   *     .setSpecialistPool(specialistPool)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   OperationFuture<SpecialistPool, UpdateSpecialistPoolOperationMetadata> future = specialistPoolServiceClient.updateSpecialistPoolOperationCallable().futureCall(request);
-   *   // Do something
-   *   SpecialistPool response = future.get();
-   * }
-   * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationCallable() { return stub.updateSpecialistPoolOperationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SpecialistPool. * *

Sample code: - * - *


-   * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
-   *   SpecialistPool specialistPool = SpecialistPool.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateSpecialistPoolRequest request = UpdateSpecialistPoolRequest.newBuilder()
-   *     .setSpecialistPool(specialistPool)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Operation> future = specialistPoolServiceClient.updateSpecialistPoolCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateSpecialistPoolCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceSettings.java index a33315488..0f1f1fecc 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; @@ -36,7 +37,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link SpecialistPoolServiceClient}. * @@ -53,31 +54,31 @@ * *

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

- * 
+ * 
{@code
  * SpecialistPoolServiceSettings.Builder specialistPoolServiceSettingsBuilder =
  *     SpecialistPoolServiceSettings.newBuilder();
  * specialistPoolServiceSettingsBuilder
  *     .getSpecialistPoolSettings()
  *     .setRetrySettings(
- *         specialistPoolServiceSettingsBuilder.getSpecialistPoolSettings().getRetrySettings().toBuilder()
+ *         specialistPoolServiceSettingsBuilder
+ *             .getSpecialistPoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
- * SpecialistPoolServiceSettings specialistPoolServiceSettings = specialistPoolServiceSettingsBuilder.build();
- * 
- * 
+ * SpecialistPoolServiceSettings specialistPoolServiceSettings = + * specialistPoolServiceSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class SpecialistPoolServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createSpecialistPool. */ public UnaryCallSettings createSpecialistPoolSettings() { return ((SpecialistPoolServiceStubSettings) getStubSettings()).createSpecialistPoolSettings(); } /** Returns the object with the settings used for calls to createSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationSettings() { @@ -103,8 +104,6 @@ public UnaryCallSettings deleteSpecialis } /** Returns the object with the settings used for calls to deleteSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings deleteSpecialistPoolOperationSettings() { return ((SpecialistPoolServiceStubSettings) getStubSettings()) @@ -117,8 +116,6 @@ public UnaryCallSettings updateSpecialis } /** Returns the object with the settings used for calls to updateSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationSettings() { @@ -187,18 +184,15 @@ protected SpecialistPoolServiceSettings(Builder settingsBuilder) throws IOExcept /** Builder for SpecialistPoolServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(SpecialistPoolServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(SpecialistPoolServiceStubSettings.newBuilder()); - } - protected Builder(SpecialistPoolServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -207,11 +201,15 @@ protected Builder(SpecialistPoolServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(SpecialistPoolServiceStubSettings.newBuilder()); + } + public SpecialistPoolServiceStubSettings.Builder getStubSettingsBuilder() { return ((SpecialistPoolServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * @@ -231,8 +229,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to createSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationSettings() { @@ -261,8 +257,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to deleteSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeleteSpecialistPoolRequest, Empty, DeleteOperationMetadata> deleteSpecialistPoolOperationSettings() { @@ -276,8 +270,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to updateSpecialistPool. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings.Builder< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationSettings() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index d9bd1d268..ffe5559e2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -15,121 +15,48 @@ */ /** - * A client to Cloud AI Platform API. + * The interfaces provided are listed below, along with usage samples. * - *

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

==================== DatasetServiceClient ==================== - * - *

Service Description: + *

======================= DatasetServiceClient ======================= * *

Sample for DatasetServiceClient: * - *

- * 
- * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
- *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
- *   Dataset response = datasetServiceClient.getDataset(name);
- * }
- * 
- * 
- * - * ===================== EndpointServiceClient ===================== - * - *

Service Description: + *

======================= EndpointServiceClient ======================= * *

Sample for EndpointServiceClient: * - *

- * 
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * 
- * 
- * - * ================ JobServiceClient ================ + *

======================= JobServiceClient ======================= * *

Service Description: A service for creating and managing AI Platform's jobs. * *

Sample for JobServiceClient: * - *

- * 
- * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   CustomJob customJob = CustomJob.newBuilder().build();
- *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
- * }
- * 
- * 
- * - * ====================== MigrationServiceClient ====================== + *

======================= MigrationServiceClient ======================= * *

Service Description: A service that migrates resources from automl.googleapis.com, * datalabeling.googleapis.com and ml.googleapis.com to AI Platform. * *

Sample for MigrationServiceClient: * - *

- * 
- * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   SearchMigratableResourcesPagedResponse response = migrationServiceClient.searchMigratableResources(parent);
- * }
- * 
- * 
- * - * ================== ModelServiceClient ================== + *

======================= ModelServiceClient ======================= * *

Service Description: A service for managing AI Platform's machine learning Models. * *

Sample for ModelServiceClient: * - *

- * 
- * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
- *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
- *   Model response = modelServiceClient.getModel(name);
- * }
- * 
- * 
- * - * ===================== PipelineServiceClient ===================== + *

======================= PipelineServiceClient ======================= * *

Service Description: A service for creating and managing AI Platform's pipelines. * *

Sample for PipelineServiceClient: * - *

- * 
- * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
- *   TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
- * }
- * 
- * 
- * - * ======================= PredictionServiceClient ======================= + *

======================= PredictionServiceClient ======================= * *

Service Description: A service for online predictions and explanations. * *

Sample for PredictionServiceClient: * - *

- * 
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List<Value> instances = new ArrayList<>();
- *   Value parameters = Value.newBuilder().build();
- *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
- * }
- * 
- * 
- * - * =========================== SpecialistPoolServiceClient =========================== + *

======================= SpecialistPoolServiceClient ======================= * *

Service Description: A service for creating and managing Customer SpecialistPools. When * customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own @@ -138,17 +65,8 @@ * CrowdCompute console. * *

Sample for SpecialistPoolServiceClient: - * - *

- * 
- * try (SpecialistPoolServiceClient specialistPoolServiceClient = SpecialistPoolServiceClient.create()) {
- *   SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
- *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
- * }
- * 
- * 
*/ -@Generated("by gapic-generator") +@Generated("by gapic-generator-java") package com.google.cloud.aiplatform.v1beta1; import javax.annotation.Generated; diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java index a5389903c..43e242b74 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDataItemsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDatasetsPagedResponse; -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; @@ -49,22 +49,19 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the DatasetService service 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 DatasetServiceStub 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()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable createDatasetOperationCallable() { throw new UnsupportedOperationException("Not implemented: createDatasetOperationCallable()"); @@ -90,7 +87,6 @@ public UnaryCallable listDatasetsCall 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()"); @@ -100,7 +96,6 @@ 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()"); @@ -110,7 +105,6 @@ 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()"); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStubSettings.java index bd97e5505..26f986eb2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse; @@ -79,7 +80,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link DatasetServiceStub}. * @@ -96,22 +97,23 @@ * *

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

- * 
+ * 
{@code
  * DatasetServiceStubSettings.Builder datasetServiceSettingsBuilder =
  *     DatasetServiceStubSettings.newBuilder();
  * datasetServiceSettingsBuilder
  *     .getDatasetSettings()
  *     .setRetrySettings(
- *         datasetServiceSettingsBuilder.getDatasetSettings().getRetrySettings().toBuilder()
+ *         datasetServiceSettingsBuilder
+ *             .getDatasetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * DatasetServiceStubSettings datasetServiceSettings = datasetServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class DatasetServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -145,13 +147,174 @@ public class DatasetServiceStubSettings extends StubSettings listAnnotationsSettings; + 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 + ? ImmutableList.of() + : payload.getDatasetsList(); + } + }; + + private static final PagedListDescriptor + LIST_DATA_ITEMS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataItemsRequest injectToken(ListDataItemsRequest payload, String token) { + return ListDataItemsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataItemsRequest injectPageSize(ListDataItemsRequest payload, int pageSize) { + return ListDataItemsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataItemsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataItemsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataItemsResponse payload) { + return payload.getDataItemsList() == null + ? ImmutableList.of() + : payload.getDataItemsList(); + } + }; + + private static final PagedListDescriptor< + ListAnnotationsRequest, ListAnnotationsResponse, Annotation> + LIST_ANNOTATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnnotationsRequest injectToken( + ListAnnotationsRequest payload, String token) { + return ListAnnotationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnnotationsRequest injectPageSize( + ListAnnotationsRequest payload, int pageSize) { + return ListAnnotationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAnnotationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnnotationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAnnotationsResponse payload) { + return payload.getAnnotationsList() == null + ? ImmutableList.of() + : payload.getAnnotationsList(); + } + }; + + 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< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + LIST_DATA_ITEMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataItemsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_ITEMS_PAGE_STR_DESC, request, context); + return ListDataItemsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + LIST_ANNOTATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAnnotationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ANNOTATIONS_PAGE_STR_DESC, request, context); + return ListAnnotationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** 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 createDataset. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings createDatasetOperationSettings() { return createDatasetOperationSettings; @@ -179,7 +342,6 @@ public UnaryCallSettings 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; @@ -191,7 +353,6 @@ public UnaryCallSettings 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; @@ -203,7 +364,6 @@ public UnaryCallSettings 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; @@ -233,10 +393,10 @@ public DatasetServiceStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcDatasetServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -312,172 +472,9 @@ protected DatasetServiceStubSettings(Builder settingsBuilder) throws IOException listAnnotationsSettings = settingsBuilder.listAnnotationsSettings().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_DATA_ITEMS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListDataItemsRequest injectToken(ListDataItemsRequest payload, String token) { - return ListDataItemsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListDataItemsRequest injectPageSize(ListDataItemsRequest payload, int pageSize) { - return ListDataItemsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListDataItemsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListDataItemsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListDataItemsResponse payload) { - return payload.getDataItemsList() != null - ? payload.getDataItemsList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor< - ListAnnotationsRequest, ListAnnotationsResponse, Annotation> - LIST_ANNOTATIONS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAnnotationsRequest injectToken( - ListAnnotationsRequest payload, String token) { - return ListAnnotationsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAnnotationsRequest injectPageSize( - ListAnnotationsRequest payload, int pageSize) { - return ListAnnotationsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListAnnotationsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAnnotationsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListAnnotationsResponse payload) { - return payload.getAnnotationsList() != null - ? payload.getAnnotationsList() - : 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< - ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> - LIST_DATA_ITEMS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListDataItemsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_DATA_ITEMS_PAGE_STR_DESC, request, context); - return ListDataItemsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> - LIST_ANNOTATIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAnnotationsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ANNOTATIONS_PAGE_STR_DESC, request, context); - return ListAnnotationsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Builder for DatasetServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createDatasetSettings; private final OperationCallSettings.Builder< CreateDatasetRequest, Dataset, CreateDatasetOperationMetadata> @@ -507,7 +504,6 @@ public static class Builder extends StubSettings.Builder listAnnotationsSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -515,20 +511,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -544,93 +527,30 @@ public static class Builder extends StubSettings.Builder>of( + createDatasetSettings, + getDatasetSettings, + updateDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + listDataItemsSettings, + getAnnotationSpecSettings, + listAnnotationsSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .getDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .updateDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .listDatasetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .deleteDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .importDataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .exportDataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .listDataItemsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .getAnnotationSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .listAnnotationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .createDatasetOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Dataset.class)) @@ -725,21 +678,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteDatasetOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -748,20 +702,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .importDataOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportDataResponse.class)) @@ -771,20 +726,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .exportDataOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ExportDataResponse.class)) @@ -794,51 +750,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(DatasetServiceStubSettings settings) { - super(settings); - - createDatasetSettings = settings.createDatasetSettings.toBuilder(); - createDatasetOperationSettings = settings.createDatasetOperationSettings.toBuilder(); - getDatasetSettings = settings.getDatasetSettings.toBuilder(); - updateDatasetSettings = settings.updateDatasetSettings.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(); - listDataItemsSettings = settings.listDataItemsSettings.toBuilder(); - getAnnotationSpecSettings = settings.getAnnotationSpecSettings.toBuilder(); - listAnnotationsSettings = settings.listAnnotationsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createDatasetSettings, - getDatasetSettings, - updateDatasetSettings, - listDatasetsSettings, - deleteDatasetSettings, - importDataSettings, - exportDataSettings, - listDataItemsSettings, - getAnnotationSpecSettings, - listAnnotationsSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStub.java index 315406eb6..72d4c8e7e 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.EndpointServiceClient.ListEndpointsPagedResponse; -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; @@ -41,22 +41,19 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the EndpointService service 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 EndpointServiceStub 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()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable createEndpointOperationCallable() { throw new UnsupportedOperationException("Not implemented: createEndpointOperationCallable()"); @@ -83,7 +80,6 @@ public UnaryCallable updateEndpointCallable() { throw new UnsupportedOperationException("Not implemented: updateEndpointCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteEndpointOperationCallable() { throw new UnsupportedOperationException("Not implemented: deleteEndpointOperationCallable()"); @@ -93,7 +89,6 @@ public UnaryCallable deleteEndpointCallable() throw new UnsupportedOperationException("Not implemented: deleteEndpointCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deployModelOperationCallable() { throw new UnsupportedOperationException("Not implemented: deployModelOperationCallable()"); @@ -103,7 +98,6 @@ public UnaryCallable deployModelCallable() { throw new UnsupportedOperationException("Not implemented: deployModelCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStubSettings.java index 4e2b99fe7..b48013d5c 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EndpointServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.EndpointServiceClient.ListEndpointsPagedResponse; @@ -69,7 +70,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link EndpointServiceStub}. * @@ -86,22 +87,23 @@ * *

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

- * 
+ * 
{@code
  * EndpointServiceStubSettings.Builder endpointServiceSettingsBuilder =
  *     EndpointServiceStubSettings.newBuilder();
  * endpointServiceSettingsBuilder
  *     .getEndpointSettings()
  *     .setRetrySettings(
- *         endpointServiceSettingsBuilder.getEndpointSettings().getRetrySettings().toBuilder()
+ *         endpointServiceSettingsBuilder
+ *             .getEndpointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * EndpointServiceStubSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class EndpointServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -128,13 +130,65 @@ public class EndpointServiceStubSettings extends StubSettings undeployModelOperationSettings; + private static final PagedListDescriptor + LIST_ENDPOINTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEndpointsRequest injectToken(ListEndpointsRequest payload, String token) { + return ListEndpointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEndpointsRequest injectPageSize(ListEndpointsRequest payload, int pageSize) { + return ListEndpointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEndpointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEndpointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEndpointsResponse payload) { + return payload.getEndpointsList() == null + ? ImmutableList.of() + : payload.getEndpointsList(); + } + }; + + private static final PagedListResponseFactory< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + LIST_ENDPOINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEndpointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ENDPOINTS_PAGE_STR_DESC, request, context); + return ListEndpointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createEndpoint. */ public UnaryCallSettings createEndpointSettings() { return createEndpointSettings; } /** Returns the object with the settings used for calls to createEndpoint. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings createEndpointOperationSettings() { return createEndpointOperationSettings; @@ -162,7 +216,6 @@ public UnaryCallSettings deleteEndpointSetting } /** Returns the object with the settings used for calls to deleteEndpoint. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings deleteEndpointOperationSettings() { return deleteEndpointOperationSettings; @@ -174,7 +227,6 @@ public UnaryCallSettings deployModelSettings() { } /** Returns the object with the settings used for calls to deployModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> deployModelOperationSettings() { @@ -187,7 +239,6 @@ public UnaryCallSettings undeployModelSettings( } /** Returns the object with the settings used for calls to undeployModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationSettings() { @@ -200,10 +251,10 @@ public EndpointServiceStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcEndpointServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -276,63 +327,9 @@ protected EndpointServiceStubSettings(Builder settingsBuilder) throws IOExceptio undeployModelOperationSettings = settingsBuilder.undeployModelOperationSettings().build(); } - private static final PagedListDescriptor - LIST_ENDPOINTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListEndpointsRequest injectToken(ListEndpointsRequest payload, String token) { - return ListEndpointsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListEndpointsRequest injectPageSize(ListEndpointsRequest payload, int pageSize) { - return ListEndpointsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListEndpointsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListEndpointsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListEndpointsResponse payload) { - return payload.getEndpointsList() != null - ? payload.getEndpointsList() - : ImmutableList.of(); - } - }; - - private static final PagedListResponseFactory< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - LIST_ENDPOINTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListEndpointsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ENDPOINTS_PAGE_STR_DESC, request, context); - return ListEndpointsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Builder for EndpointServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createEndpointSettings; private final OperationCallSettings.Builder< @@ -356,28 +353,14 @@ public static class Builder extends StubSettings.Builder undeployModelOperationSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -386,24 +369,6 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_5_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(5000L)) @@ -412,68 +377,26 @@ public static class Builder extends StubSettings.Builder>of( + createEndpointSettings, + getEndpointSettings, + listEndpointsSettings, + updateEndpointSettings, + deleteEndpointSettings, + deployModelSettings, + undeployModelSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .createEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .getEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .listEndpointsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .updateEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .deleteEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .deployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .undeployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .createEndpointOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Endpoint.class)) @@ -550,21 +500,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteEndpointOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -573,20 +524,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deployModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(DeployModelResponse.class)) @@ -596,21 +548,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .undeployModelOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(UndeployModelResponse.class)) @@ -620,45 +573,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(EndpointServiceStubSettings settings) { - super(settings); - - createEndpointSettings = settings.createEndpointSettings.toBuilder(); - createEndpointOperationSettings = settings.createEndpointOperationSettings.toBuilder(); - getEndpointSettings = settings.getEndpointSettings.toBuilder(); - listEndpointsSettings = settings.listEndpointsSettings.toBuilder(); - updateEndpointSettings = settings.updateEndpointSettings.toBuilder(); - deleteEndpointSettings = settings.deleteEndpointSettings.toBuilder(); - deleteEndpointOperationSettings = settings.deleteEndpointOperationSettings.toBuilder(); - deployModelSettings = settings.deployModelSettings.toBuilder(); - deployModelOperationSettings = settings.deployModelOperationSettings.toBuilder(); - undeployModelSettings = settings.undeployModelSettings.toBuilder(); - undeployModelOperationSettings = settings.undeployModelOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createEndpointSettings, - getEndpointSettings, - listEndpointsSettings, - updateEndpointSettings, - deleteEndpointSettings, - deployModelSettings, - undeployModelSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceCallableFactory.java index bb76584c4..867fbc8b4 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the DatasetService service 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 GrpcDatasetServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceStub.java index a58fa355c..df5240454 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDatasetServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDataItemsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDatasetsPagedResponse; -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; @@ -60,16 +60,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the DatasetService service 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") +@Generated("by gapic-generator-java") public class GrpcDatasetServiceStub extends DatasetServiceStub { - private static final MethodDescriptor createDatasetMethodDescriptor = MethodDescriptor.newBuilder() @@ -79,6 +77,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getDatasetMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -86,6 +85,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) .build(); + private static final MethodDescriptor updateDatasetMethodDescriptor = MethodDescriptor.newBuilder() @@ -95,6 +95,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) .build(); + private static final MethodDescriptor listDatasetsMethodDescriptor = MethodDescriptor.newBuilder() @@ -104,6 +105,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteDatasetMethodDescriptor = MethodDescriptor.newBuilder() @@ -113,6 +115,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { ProtoUtils.marshaller(DeleteDatasetRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor importDataMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -120,6 +123,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ImportDataRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor exportDataMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -127,6 +131,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ExportDataRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor listDataItemsMethodDescriptor = MethodDescriptor.newBuilder() @@ -137,6 +142,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListDataItemsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getAnnotationSpecMethodDescriptor = MethodDescriptor.newBuilder() @@ -146,6 +152,7 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { ProtoUtils.marshaller(GetAnnotationSpecRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AnnotationSpec.getDefaultInstance())) .build(); + private static final MethodDescriptor listAnnotationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -157,9 +164,6 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { ProtoUtils.marshaller(ListAnnotationsResponse.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable createDatasetCallable; private final OperationCallable createDatasetOperationCallable; @@ -188,6 +192,8 @@ public class GrpcDatasetServiceStub extends DatasetServiceStub { private final UnaryCallable listAnnotationsPagedCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcDatasetServiceStub create(DatasetServiceStubSettings settings) @@ -370,7 +376,7 @@ public Map extract(ListAnnotationsRequest request) { createDatasetTransportSettings, settings.createDatasetOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.getDatasetCallable = callableFactory.createUnaryCallable( getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); @@ -391,7 +397,7 @@ public Map extract(ListAnnotationsRequest request) { deleteDatasetTransportSettings, settings.deleteDatasetOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.importDataCallable = callableFactory.createUnaryCallable( importDataTransportSettings, settings.importDataSettings(), clientContext); @@ -400,7 +406,7 @@ public Map extract(ListAnnotationsRequest request) { importDataTransportSettings, settings.importDataOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.exportDataCallable = callableFactory.createUnaryCallable( exportDataTransportSettings, settings.exportDataSettings(), clientContext); @@ -409,7 +415,7 @@ public Map extract(ListAnnotationsRequest request) { exportDataTransportSettings, settings.exportDataOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.listDataItemsCallable = callableFactory.createUnaryCallable( listDataItemsTransportSettings, settings.listDataItemsSettings(), clientContext); @@ -428,24 +434,23 @@ public Map extract(ListAnnotationsRequest request) { callableFactory.createPagedCallable( listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable createDatasetCallable() { + return createDatasetCallable; + } + public OperationCallable createDatasetOperationCallable() { return createDatasetOperationCallable; } - public UnaryCallable createDatasetCallable() { - return createDatasetCallable; - } - public UnaryCallable getDatasetCallable() { return getDatasetCallable; } @@ -454,42 +459,43 @@ public UnaryCallable updateDatasetCallable() { return updateDatasetCallable; } + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + public UnaryCallable listDatasetsPagedCallable() { return listDatasetsPagedCallable; } - public UnaryCallable listDatasetsCallable() { - return listDatasetsCallable; + 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 deleteDatasetOperationCallable() { return deleteDatasetOperationCallable; } - public UnaryCallable deleteDatasetCallable() { - return deleteDatasetCallable; + 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 importDataOperationCallable() { return importDataOperationCallable; } - public UnaryCallable importDataCallable() { - return importDataCallable; + 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 exportDataOperationCallable() { return exportDataOperationCallable; } - public UnaryCallable exportDataCallable() { - return exportDataCallable; + public UnaryCallable listDataItemsCallable() { + return listDataItemsCallable; } public UnaryCallable @@ -497,23 +503,19 @@ public UnaryCallable exportDataCallable() { return listDataItemsPagedCallable; } - public UnaryCallable listDataItemsCallable() { - return listDataItemsCallable; - } - public UnaryCallable getAnnotationSpecCallable() { return getAnnotationSpecCallable; } + public UnaryCallable listAnnotationsCallable() { + return listAnnotationsCallable; + } + public UnaryCallable listAnnotationsPagedCallable() { return listAnnotationsPagedCallable; } - public UnaryCallable listAnnotationsCallable() { - return listAnnotationsCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceCallableFactory.java index aeb3830bd..67f8d8310 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the EndpointService service 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 GrpcEndpointServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceStub.java index 00ba1a2a1..ba20e502a 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcEndpointServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.EndpointServiceClient.ListEndpointsPagedResponse; -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; @@ -52,16 +52,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the EndpointService service 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") +@Generated("by gapic-generator-java") public class GrpcEndpointServiceStub extends EndpointServiceStub { - private static final MethodDescriptor createEndpointMethodDescriptor = MethodDescriptor.newBuilder() @@ -71,6 +69,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { ProtoUtils.marshaller(CreateEndpointRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getEndpointMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -78,6 +77,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetEndpointRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) .build(); + private static final MethodDescriptor listEndpointsMethodDescriptor = MethodDescriptor.newBuilder() @@ -88,6 +88,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListEndpointsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor updateEndpointMethodDescriptor = MethodDescriptor.newBuilder() @@ -97,6 +98,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { ProtoUtils.marshaller(UpdateEndpointRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteEndpointMethodDescriptor = MethodDescriptor.newBuilder() @@ -106,6 +108,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { ProtoUtils.marshaller(DeleteEndpointRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor deployModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -113,6 +116,7 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(DeployModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor undeployModelMethodDescriptor = MethodDescriptor.newBuilder() @@ -123,9 +127,6 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable createEndpointCallable; private final OperationCallable createEndpointOperationCallable; @@ -146,6 +147,8 @@ public class GrpcEndpointServiceStub extends EndpointServiceStub { UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcEndpointServiceStub create(EndpointServiceStubSettings settings) @@ -288,7 +291,7 @@ public Map extract(UndeployModelRequest request) { createEndpointTransportSettings, settings.createEndpointOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.getEndpointCallable = callableFactory.createUnaryCallable( getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); @@ -309,7 +312,7 @@ public Map extract(UndeployModelRequest request) { deleteEndpointTransportSettings, settings.deleteEndpointOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.deployModelCallable = callableFactory.createUnaryCallable( deployModelTransportSettings, settings.deployModelSettings(), clientContext); @@ -318,7 +321,7 @@ public Map extract(UndeployModelRequest request) { deployModelTransportSettings, settings.deployModelOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.undeployModelCallable = callableFactory.createUnaryCallable( undeployModelTransportSettings, settings.undeployModelSettings(), clientContext); @@ -327,74 +330,70 @@ public Map extract(UndeployModelRequest request) { undeployModelTransportSettings, settings.undeployModelOperationSettings(), clientContext, - this.operationsStub); + operationsStub); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable createEndpointCallable() { + return createEndpointCallable; + } + public OperationCallable createEndpointOperationCallable() { return createEndpointOperationCallable; } - public UnaryCallable createEndpointCallable() { - return createEndpointCallable; - } - public UnaryCallable getEndpointCallable() { return getEndpointCallable; } + public UnaryCallable listEndpointsCallable() { + return listEndpointsCallable; + } + public UnaryCallable listEndpointsPagedCallable() { return listEndpointsPagedCallable; } - public UnaryCallable listEndpointsCallable() { - return listEndpointsCallable; - } - public UnaryCallable updateEndpointCallable() { return updateEndpointCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable deleteEndpointCallable() { + return deleteEndpointCallable; + } + public OperationCallable deleteEndpointOperationCallable() { return deleteEndpointOperationCallable; } - public UnaryCallable deleteEndpointCallable() { - return deleteEndpointCallable; + public UnaryCallable deployModelCallable() { + return deployModelCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deployModelOperationCallable() { return deployModelOperationCallable; } - public UnaryCallable deployModelCallable() { - return deployModelCallable; + public UnaryCallable undeployModelCallable() { + return undeployModelCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationCallable() { return undeployModelOperationCallable; } - public UnaryCallable undeployModelCallable() { - return undeployModelCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceCallableFactory.java index 667fb9692..d1dcbdaa7 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the JobService service 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 GrpcJobServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java index 2d2de84ce..472f4ccd2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListBatchPredictionJobsPagedResponse; @@ -20,7 +21,6 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListDataLabelingJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; -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; @@ -69,16 +69,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the JobService service 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") +@Generated("by gapic-generator-java") public class GrpcJobServiceStub extends JobServiceStub { - private static final MethodDescriptor createCustomJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -88,6 +86,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CreateCustomJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CustomJob.getDefaultInstance())) .build(); + private static final MethodDescriptor getCustomJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -96,6 +95,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetCustomJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CustomJob.getDefaultInstance())) .build(); + private static final MethodDescriptor listCustomJobsMethodDescriptor = MethodDescriptor.newBuilder() @@ -106,6 +106,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListCustomJobsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteCustomJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -115,6 +116,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(DeleteCustomJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor cancelCustomJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -124,6 +126,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CancelCustomJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor createDataLabelingJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +136,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CreateDataLabelingJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DataLabelingJob.getDefaultInstance())) .build(); + private static final MethodDescriptor getDataLabelingJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -142,6 +146,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(GetDataLabelingJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DataLabelingJob.getDefaultInstance())) .build(); + private static final MethodDescriptor listDataLabelingJobsMethodDescriptor = MethodDescriptor.newBuilder() @@ -152,6 +157,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListDataLabelingJobsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteDataLabelingJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -161,6 +167,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(DeleteDataLabelingJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor cancelDataLabelingJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -170,6 +177,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CancelDataLabelingJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor< CreateHyperparameterTuningJobRequest, HyperparameterTuningJob> createHyperparameterTuningJobMethodDescriptor = @@ -183,6 +191,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(HyperparameterTuningJob.getDefaultInstance())) .build(); + private static final MethodDescriptor getHyperparameterTuningJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -194,6 +203,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(HyperparameterTuningJob.getDefaultInstance())) .build(); + private static final MethodDescriptor< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> listHyperparameterTuningJobsMethodDescriptor = @@ -208,6 +218,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListHyperparameterTuningJobsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteHyperparameterTuningJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -218,6 +229,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(DeleteHyperparameterTuningJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor cancelHyperparameterTuningJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -228,6 +240,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CancelHyperparameterTuningJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor createBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -238,6 +251,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(CreateBatchPredictionJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BatchPredictionJob.getDefaultInstance())) .build(); + private static final MethodDescriptor getBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -247,6 +261,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(GetBatchPredictionJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BatchPredictionJob.getDefaultInstance())) .build(); + private static final MethodDescriptor< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse> listBatchPredictionJobsMethodDescriptor = @@ -260,6 +275,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListBatchPredictionJobsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -270,6 +286,7 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(DeleteBatchPredictionJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor cancelBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -281,9 +298,6 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable createCustomJobCallable; private final UnaryCallable getCustomJobCallable; private final UnaryCallable listCustomJobsCallable; @@ -338,6 +352,8 @@ public class GrpcJobServiceStub extends JobServiceStub { private final UnaryCallable cancelBatchPredictionJobCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcJobServiceStub create(JobServiceStubSettings settings) @@ -684,7 +700,7 @@ public Map extract(CancelBatchPredictionJobRequest request) { deleteCustomJobTransportSettings, settings.deleteCustomJobOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.cancelCustomJobCallable = callableFactory.createUnaryCallable( cancelCustomJobTransportSettings, settings.cancelCustomJobSettings(), clientContext); @@ -718,7 +734,7 @@ public Map extract(CancelBatchPredictionJobRequest request) { deleteDataLabelingJobTransportSettings, settings.deleteDataLabelingJobOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.cancelDataLabelingJobCallable = callableFactory.createUnaryCallable( cancelDataLabelingJobTransportSettings, @@ -754,7 +770,7 @@ public Map extract(CancelBatchPredictionJobRequest request) { deleteHyperparameterTuningJobTransportSettings, settings.deleteHyperparameterTuningJobOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.cancelHyperparameterTuningJobCallable = callableFactory.createUnaryCallable( cancelHyperparameterTuningJobTransportSettings, @@ -790,17 +806,17 @@ public Map extract(CancelBatchPredictionJobRequest request) { deleteBatchPredictionJobTransportSettings, settings.deleteBatchPredictionJobOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.cancelBatchPredictionJobCallable = callableFactory.createUnaryCallable( cancelBatchPredictionJobTransportSettings, settings.cancelBatchPredictionJobSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } @@ -813,25 +829,24 @@ public UnaryCallable getCustomJobCallable() { return getCustomJobCallable; } + public UnaryCallable listCustomJobsCallable() { + return listCustomJobsCallable; + } + public UnaryCallable listCustomJobsPagedCallable() { return listCustomJobsPagedCallable; } - public UnaryCallable listCustomJobsCallable() { - return listCustomJobsCallable; + public UnaryCallable deleteCustomJobCallable() { + return deleteCustomJobCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteCustomJobOperationCallable() { return deleteCustomJobOperationCallable; } - public UnaryCallable deleteCustomJobCallable() { - return deleteCustomJobCallable; - } - public UnaryCallable cancelCustomJobCallable() { return cancelCustomJobCallable; } @@ -845,26 +860,25 @@ public UnaryCallable getDataLabeling return getDataLabelingJobCallable; } + public UnaryCallable + listDataLabelingJobsCallable() { + return listDataLabelingJobsCallable; + } + public UnaryCallable listDataLabelingJobsPagedCallable() { return listDataLabelingJobsPagedCallable; } - public UnaryCallable - listDataLabelingJobsCallable() { - return listDataLabelingJobsCallable; + public UnaryCallable deleteDataLabelingJobCallable() { + return deleteDataLabelingJobCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteDataLabelingJobOperationCallable() { return deleteDataLabelingJobOperationCallable; } - public UnaryCallable deleteDataLabelingJobCallable() { - return deleteDataLabelingJobCallable; - } - public UnaryCallable cancelDataLabelingJobCallable() { return cancelDataLabelingJobCallable; } @@ -879,28 +893,27 @@ public UnaryCallable cancelDataLabelingJobC return getHyperparameterTuningJobCallable; } + public UnaryCallable + listHyperparameterTuningJobsCallable() { + return listHyperparameterTuningJobsCallable; + } + public UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> listHyperparameterTuningJobsPagedCallable() { return listHyperparameterTuningJobsPagedCallable; } - public UnaryCallable - listHyperparameterTuningJobsCallable() { - return listHyperparameterTuningJobsCallable; + public UnaryCallable + deleteHyperparameterTuningJobCallable() { + return deleteHyperparameterTuningJobCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteHyperparameterTuningJobOperationCallable() { return deleteHyperparameterTuningJobOperationCallable; } - public UnaryCallable - deleteHyperparameterTuningJobCallable() { - return deleteHyperparameterTuningJobCallable; - } - public UnaryCallable cancelHyperparameterTuningJobCallable() { return cancelHyperparameterTuningJobCallable; @@ -916,20 +929,14 @@ public UnaryCallable cancelDataLabelingJobC return getBatchPredictionJobCallable; } - public UnaryCallable - listBatchPredictionJobsPagedCallable() { - return listBatchPredictionJobsPagedCallable; - } - public UnaryCallable listBatchPredictionJobsCallable() { return listBatchPredictionJobsCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteBatchPredictionJobOperationCallable() { - return deleteBatchPredictionJobOperationCallable; + public UnaryCallable + listBatchPredictionJobsPagedCallable() { + return listBatchPredictionJobsPagedCallable; } public UnaryCallable @@ -937,6 +944,11 @@ public UnaryCallable cancelDataLabelingJobC return deleteBatchPredictionJobCallable; } + public OperationCallable + deleteBatchPredictionJobOperationCallable() { + return deleteBatchPredictionJobOperationCallable; + } + public UnaryCallable cancelBatchPredictionJobCallable() { return cancelBatchPredictionJobCallable; } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceCallableFactory.java index a64ea1c29..3f9dd12b2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the MigrationService service 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 GrpcMigrationServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceStub.java index 70742c5be..4fcb60e3f 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcMigrationServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; -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; @@ -41,16 +41,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the MigrationService service 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") +@Generated("by gapic-generator-java") public class GrpcMigrationServiceStub extends MigrationServiceStub { - private static final MethodDescriptor< SearchMigratableResourcesRequest, SearchMigratableResourcesResponse> searchMigratableResourcesMethodDescriptor = @@ -64,6 +62,7 @@ public class GrpcMigrationServiceStub extends MigrationServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(SearchMigratableResourcesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor batchMigrateResourcesMethodDescriptor = MethodDescriptor.newBuilder() @@ -75,9 +74,6 @@ public class GrpcMigrationServiceStub extends MigrationServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable searchMigratableResourcesCallable; private final UnaryCallable< @@ -91,6 +87,8 @@ public class GrpcMigrationServiceStub extends MigrationServiceStub { BatchMigrateResourcesOperationMetadata> batchMigrateResourcesOperationCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcMigrationServiceStub create(MigrationServiceStubSettings settings) @@ -183,27 +181,30 @@ public Map extract(BatchMigrateResourcesRequest request) { batchMigrateResourcesTransportSettings, settings.batchMigrateResourcesOperationSettings(), clientContext, - this.operationsStub); + operationsStub); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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 + searchMigratableResourcesCallable() { + return searchMigratableResourcesCallable; + } + public UnaryCallable searchMigratableResourcesPagedCallable() { return searchMigratableResourcesPagedCallable; } - public UnaryCallable - searchMigratableResourcesCallable() { - return searchMigratableResourcesCallable; + public UnaryCallable batchMigrateResourcesCallable() { + return batchMigrateResourcesCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< BatchMigrateResourcesRequest, BatchMigrateResourcesResponse, @@ -212,10 +213,6 @@ public GrpcOperationsStub getOperationsStub() { return batchMigrateResourcesOperationCallable; } - public UnaryCallable batchMigrateResourcesCallable() { - return batchMigrateResourcesCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceCallableFactory.java index 5b65cbc31..f56cc2f5f 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the ModelService service 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 GrpcModelServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java index 70bb98d9f..5684f69a2 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.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; @@ -60,16 +60,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the ModelService service 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") +@Generated("by gapic-generator-java") public class GrpcModelServiceStub extends ModelServiceStub { - private static final MethodDescriptor uploadModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -77,6 +75,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(UploadModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -84,6 +83,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) .build(); + private static final MethodDescriptor listModelsMethodDescriptor = MethodDescriptor.newBuilder() @@ -92,6 +92,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor updateModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -99,6 +100,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(UpdateModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -106,6 +108,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(DeleteModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor exportModelMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -113,6 +116,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ExportModelRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getModelEvaluationMethodDescriptor = MethodDescriptor.newBuilder() @@ -122,6 +126,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { ProtoUtils.marshaller(GetModelEvaluationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) .build(); + private static final MethodDescriptor listModelEvaluationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +138,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListModelEvaluationsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getModelEvaluationSliceMethodDescriptor = MethodDescriptor.newBuilder() @@ -144,6 +150,7 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ModelEvaluationSlice.getDefaultInstance())) .build(); + private static final MethodDescriptor< ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesResponse> listModelEvaluationSlicesMethodDescriptor = @@ -158,9 +165,6 @@ public class GrpcModelServiceStub extends ModelServiceStub { ProtoUtils.marshaller(ListModelEvaluationSlicesResponse.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable uploadModelCallable; private final OperationCallable< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> @@ -190,6 +194,8 @@ public class GrpcModelServiceStub extends ModelServiceStub { ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesPagedResponse> listModelEvaluationSlicesPagedCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcModelServiceStub create(ModelServiceStubSettings settings) @@ -374,7 +380,7 @@ public Map extract(ListModelEvaluationSlicesRequest request) { uploadModelTransportSettings, settings.uploadModelOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.getModelCallable = callableFactory.createUnaryCallable( getModelTransportSettings, settings.getModelSettings(), clientContext); @@ -395,7 +401,7 @@ public Map extract(ListModelEvaluationSlicesRequest request) { deleteModelTransportSettings, settings.deleteModelOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.exportModelCallable = callableFactory.createUnaryCallable( exportModelTransportSettings, settings.exportModelSettings(), clientContext); @@ -404,7 +410,7 @@ public Map extract(ListModelEvaluationSlicesRequest request) { exportModelTransportSettings, settings.exportModelOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.getModelEvaluationCallable = callableFactory.createUnaryCallable( getModelEvaluationTransportSettings, @@ -436,89 +442,86 @@ public Map extract(ListModelEvaluationSlicesRequest request) { settings.listModelEvaluationSlicesSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable uploadModelCallable() { + return uploadModelCallable; + } + public OperationCallable uploadModelOperationCallable() { return uploadModelOperationCallable; } - public UnaryCallable uploadModelCallable() { - return uploadModelCallable; - } - public UnaryCallable getModelCallable() { return getModelCallable; } - public UnaryCallable listModelsPagedCallable() { - return listModelsPagedCallable; - } - public UnaryCallable listModelsCallable() { return listModelsCallable; } + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + public UnaryCallable updateModelCallable() { return updateModelCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + public OperationCallable deleteModelOperationCallable() { return deleteModelOperationCallable; } - public UnaryCallable deleteModelCallable() { - return deleteModelCallable; + public UnaryCallable exportModelCallable() { + return exportModelCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable exportModelOperationCallable() { return exportModelOperationCallable; } - public UnaryCallable exportModelCallable() { - return exportModelCallable; - } - public UnaryCallable getModelEvaluationCallable() { return getModelEvaluationCallable; } - public UnaryCallable - listModelEvaluationsPagedCallable() { - return listModelEvaluationsPagedCallable; - } - public UnaryCallable listModelEvaluationsCallable() { return listModelEvaluationsCallable; } + public UnaryCallable + listModelEvaluationsPagedCallable() { + return listModelEvaluationsPagedCallable; + } + public UnaryCallable getModelEvaluationSliceCallable() { return getModelEvaluationSliceCallable; } - public UnaryCallable - listModelEvaluationSlicesPagedCallable() { - return listModelEvaluationSlicesPagedCallable; - } - public UnaryCallable listModelEvaluationSlicesCallable() { return listModelEvaluationSlicesCallable; } + public UnaryCallable + listModelEvaluationSlicesPagedCallable() { + return listModelEvaluationSlicesPagedCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceCallableFactory.java index cd5a6f5fa..c9289b973 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the PipelineService service 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 GrpcPipelineServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java index 34387d171..84aaf3c5c 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; -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; @@ -45,16 +45,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the PipelineService service 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") +@Generated("by gapic-generator-java") public class GrpcPipelineServiceStub extends PipelineServiceStub { - private static final MethodDescriptor createTrainingPipelineMethodDescriptor = MethodDescriptor.newBuilder() @@ -65,6 +63,7 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { ProtoUtils.marshaller(CreateTrainingPipelineRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TrainingPipeline.getDefaultInstance())) .build(); + private static final MethodDescriptor getTrainingPipelineMethodDescriptor = MethodDescriptor.newBuilder() @@ -75,6 +74,7 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { ProtoUtils.marshaller(GetTrainingPipelineRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TrainingPipeline.getDefaultInstance())) .build(); + private static final MethodDescriptor listTrainingPipelinesMethodDescriptor = MethodDescriptor.newBuilder() @@ -86,6 +86,7 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListTrainingPipelinesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteTrainingPipelineMethodDescriptor = MethodDescriptor.newBuilder() @@ -96,6 +97,7 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { ProtoUtils.marshaller(DeleteTrainingPipelineRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor cancelTrainingPipelineMethodDescriptor = MethodDescriptor.newBuilder() @@ -107,9 +109,6 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable createTrainingPipelineCallable; private final UnaryCallable @@ -124,6 +123,8 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { deleteTrainingPipelineOperationCallable; private final UnaryCallable cancelTrainingPipelineCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcPipelineServiceStub create(PipelineServiceStubSettings settings) @@ -267,17 +268,17 @@ public Map extract(CancelTrainingPipelineRequest request) { deleteTrainingPipelineTransportSettings, settings.deleteTrainingPipelineOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.cancelTrainingPipelineCallable = callableFactory.createUnaryCallable( cancelTrainingPipelineTransportSettings, settings.cancelTrainingPipelineSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } @@ -291,26 +292,25 @@ public UnaryCallable getTrainingPi return getTrainingPipelineCallable; } + public UnaryCallable + listTrainingPipelinesCallable() { + return listTrainingPipelinesCallable; + } + public UnaryCallable listTrainingPipelinesPagedCallable() { return listTrainingPipelinesPagedCallable; } - public UnaryCallable - listTrainingPipelinesCallable() { - return listTrainingPipelinesCallable; + public UnaryCallable deleteTrainingPipelineCallable() { + return deleteTrainingPipelineCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteTrainingPipelineOperationCallable() { return deleteTrainingPipelineOperationCallable; } - public UnaryCallable deleteTrainingPipelineCallable() { - return deleteTrainingPipelineCallable; - } - public UnaryCallable cancelTrainingPipelineCallable() { return cancelTrainingPipelineCallable; } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceCallableFactory.java index 77fcd82b3..62f166cdd 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the PredictionService service 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, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java index 1996b6780..9835ec3e8 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -28,6 +28,7 @@ import com.google.cloud.aiplatform.v1beta1.PredictRequest; import com.google.cloud.aiplatform.v1beta1.PredictResponse; import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; @@ -35,16 +36,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the PredictionService service 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") +@Generated("by gapic-generator-java") public class GrpcPredictionServiceStub extends PredictionServiceStub { - private static final MethodDescriptor predictMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -52,6 +51,7 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(PredictRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PredictResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor explainMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -60,11 +60,11 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(ExplainResponse.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final UnaryCallable predictCallable; private final UnaryCallable explainCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcPredictionServiceStub create(PredictionServiceStubSettings settings) @@ -105,6 +105,7 @@ protected GrpcPredictionServiceStub( GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings predictTransportSettings = GrpcCallSettings.newBuilder() @@ -140,7 +141,12 @@ public Map extract(ExplainRequest request) { callableFactory.createUnaryCallable( explainTransportSettings, settings.explainSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; } public UnaryCallable predictCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceCallableFactory.java index 29308ff8a..ec9ec56bc 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceCallableFactory.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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; @@ -31,18 +31,19 @@ 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.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Cloud AI Platform API. + * gRPC callable factory implementation for the SpecialistPoolService service 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 GrpcSpecialistPoolServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, 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, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceStub.java index 2c9ed88f6..3983992be 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcSpecialistPoolServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; -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; @@ -47,16 +47,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Cloud AI Platform API. + * gRPC stub implementation for the SpecialistPoolService service 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") +@Generated("by gapic-generator-java") public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { - private static final MethodDescriptor createSpecialistPoolMethodDescriptor = MethodDescriptor.newBuilder() @@ -67,6 +65,7 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { ProtoUtils.marshaller(CreateSpecialistPoolRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getSpecialistPoolMethodDescriptor = MethodDescriptor.newBuilder() @@ -77,6 +76,7 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { ProtoUtils.marshaller(GetSpecialistPoolRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SpecialistPool.getDefaultInstance())) .build(); + private static final MethodDescriptor listSpecialistPoolsMethodDescriptor = MethodDescriptor.newBuilder() @@ -88,6 +88,7 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListSpecialistPoolsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteSpecialistPoolMethodDescriptor = MethodDescriptor.newBuilder() @@ -98,6 +99,7 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { ProtoUtils.marshaller(DeleteSpecialistPoolRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor updateSpecialistPoolMethodDescriptor = MethodDescriptor.newBuilder() @@ -109,9 +111,6 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable createSpecialistPoolCallable; private final OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> @@ -129,6 +128,8 @@ public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcSpecialistPoolServiceStub create( @@ -250,7 +251,7 @@ public Map extract(UpdateSpecialistPoolRequest request) { createSpecialistPoolTransportSettings, settings.createSpecialistPoolOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.getSpecialistPoolCallable = callableFactory.createUnaryCallable( getSpecialistPoolTransportSettings, @@ -276,7 +277,7 @@ public Map extract(UpdateSpecialistPoolRequest request) { deleteSpecialistPoolTransportSettings, settings.deleteSpecialistPoolOperationSettings(), clientContext, - this.operationsStub); + operationsStub); this.updateSpecialistPoolCallable = callableFactory.createUnaryCallable( updateSpecialistPoolTransportSettings, @@ -287,62 +288,59 @@ public Map extract(UpdateSpecialistPoolRequest request) { updateSpecialistPoolTransportSettings, settings.updateSpecialistPoolOperationSettings(), clientContext, - this.operationsStub); + operationsStub); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.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; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public UnaryCallable createSpecialistPoolCallable() { + return createSpecialistPoolCallable; + } + public OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationCallable() { return createSpecialistPoolOperationCallable; } - public UnaryCallable createSpecialistPoolCallable() { - return createSpecialistPoolCallable; - } - public UnaryCallable getSpecialistPoolCallable() { return getSpecialistPoolCallable; } + public UnaryCallable + listSpecialistPoolsCallable() { + return listSpecialistPoolsCallable; + } + public UnaryCallable listSpecialistPoolsPagedCallable() { return listSpecialistPoolsPagedCallable; } - public UnaryCallable - listSpecialistPoolsCallable() { - return listSpecialistPoolsCallable; + public UnaryCallable deleteSpecialistPoolCallable() { + return deleteSpecialistPoolCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteSpecialistPoolOperationCallable() { return deleteSpecialistPoolOperationCallable; } - public UnaryCallable deleteSpecialistPoolCallable() { - return deleteSpecialistPoolCallable; + public UnaryCallable updateSpecialistPoolCallable() { + return updateSpecialistPoolCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationCallable() { return updateSpecialistPoolOperationCallable; } - public UnaryCallable updateSpecialistPoolCallable() { - return updateSpecialistPoolCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java index c639564d5..2d43a0e8b 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListBatchPredictionJobsPagedResponse; @@ -20,7 +21,6 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListDataLabelingJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; -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; @@ -58,17 +58,15 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the JobService service 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 JobServiceStub 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()"); } @@ -90,7 +88,6 @@ public UnaryCallable listCustomJo throw new UnsupportedOperationException("Not implemented: listCustomJobsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteCustomJobOperationCallable() { throw new UnsupportedOperationException("Not implemented: deleteCustomJobOperationCallable()"); @@ -123,7 +120,6 @@ public UnaryCallable getDataLabeling throw new UnsupportedOperationException("Not implemented: listDataLabelingJobsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteDataLabelingJobOperationCallable() { throw new UnsupportedOperationException( @@ -163,7 +159,6 @@ public UnaryCallable cancelDataLabelingJobC "Not implemented: listHyperparameterTuningJobsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteHyperparameterTuningJobOperationCallable() { throw new UnsupportedOperationException( @@ -203,7 +198,6 @@ public UnaryCallable cancelDataLabelingJobC throw new UnsupportedOperationException("Not implemented: listBatchPredictionJobsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteBatchPredictionJobOperationCallable() { throw new UnsupportedOperationException( diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java index 07986a435..f01256770 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListBatchPredictionJobsPagedResponse; @@ -86,7 +87,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link JobServiceStub}. * @@ -103,22 +104,22 @@ * *

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

- * 
- * JobServiceStubSettings.Builder jobServiceSettingsBuilder =
- *     JobServiceStubSettings.newBuilder();
+ * 
{@code
+ * JobServiceStubSettings.Builder jobServiceSettingsBuilder = JobServiceStubSettings.newBuilder();
  * jobServiceSettingsBuilder
  *     .createCustomJobSettings()
  *     .setRetrySettings(
- *         jobServiceSettingsBuilder.createCustomJobSettings().getRetrySettings().toBuilder()
+ *         jobServiceSettingsBuilder
+ *             .createCustomJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * JobServiceStubSettings jobServiceSettings = jobServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class JobServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -181,262 +182,6 @@ public class JobServiceStubSettings extends StubSettings private final UnaryCallSettings cancelBatchPredictionJobSettings; - /** Returns the object with the settings used for calls to createCustomJob. */ - public UnaryCallSettings createCustomJobSettings() { - return createCustomJobSettings; - } - - /** Returns the object with the settings used for calls to getCustomJob. */ - public UnaryCallSettings getCustomJobSettings() { - return getCustomJobSettings; - } - - /** Returns the object with the settings used for calls to listCustomJobs. */ - public PagedCallSettings< - ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> - listCustomJobsSettings() { - return listCustomJobsSettings; - } - - /** Returns the object with the settings used for calls to deleteCustomJob. */ - public UnaryCallSettings deleteCustomJobSettings() { - return deleteCustomJobSettings; - } - - /** Returns the object with the settings used for calls to deleteCustomJob. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteCustomJobOperationSettings() { - return deleteCustomJobOperationSettings; - } - - /** Returns the object with the settings used for calls to cancelCustomJob. */ - public UnaryCallSettings cancelCustomJobSettings() { - return cancelCustomJobSettings; - } - - /** Returns the object with the settings used for calls to createDataLabelingJob. */ - public UnaryCallSettings - createDataLabelingJobSettings() { - return createDataLabelingJobSettings; - } - - /** Returns the object with the settings used for calls to getDataLabelingJob. */ - public UnaryCallSettings - getDataLabelingJobSettings() { - return getDataLabelingJobSettings; - } - - /** Returns the object with the settings used for calls to listDataLabelingJobs. */ - public PagedCallSettings< - ListDataLabelingJobsRequest, - ListDataLabelingJobsResponse, - ListDataLabelingJobsPagedResponse> - listDataLabelingJobsSettings() { - return listDataLabelingJobsSettings; - } - - /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ - public UnaryCallSettings - deleteDataLabelingJobSettings() { - return deleteDataLabelingJobSettings; - } - - /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteDataLabelingJobOperationSettings() { - return deleteDataLabelingJobOperationSettings; - } - - /** Returns the object with the settings used for calls to cancelDataLabelingJob. */ - public UnaryCallSettings cancelDataLabelingJobSettings() { - return cancelDataLabelingJobSettings; - } - - /** Returns the object with the settings used for calls to createHyperparameterTuningJob. */ - public UnaryCallSettings - createHyperparameterTuningJobSettings() { - return createHyperparameterTuningJobSettings; - } - - /** Returns the object with the settings used for calls to getHyperparameterTuningJob. */ - public UnaryCallSettings - getHyperparameterTuningJobSettings() { - return getHyperparameterTuningJobSettings; - } - - /** Returns the object with the settings used for calls to listHyperparameterTuningJobs. */ - public PagedCallSettings< - ListHyperparameterTuningJobsRequest, - ListHyperparameterTuningJobsResponse, - ListHyperparameterTuningJobsPagedResponse> - listHyperparameterTuningJobsSettings() { - return listHyperparameterTuningJobsSettings; - } - - /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ - public UnaryCallSettings - deleteHyperparameterTuningJobSettings() { - return deleteHyperparameterTuningJobSettings; - } - - /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteHyperparameterTuningJobOperationSettings() { - return deleteHyperparameterTuningJobOperationSettings; - } - - /** Returns the object with the settings used for calls to cancelHyperparameterTuningJob. */ - public UnaryCallSettings - cancelHyperparameterTuningJobSettings() { - return cancelHyperparameterTuningJobSettings; - } - - /** Returns the object with the settings used for calls to createBatchPredictionJob. */ - public UnaryCallSettings - createBatchPredictionJobSettings() { - return createBatchPredictionJobSettings; - } - - /** Returns the object with the settings used for calls to getBatchPredictionJob. */ - public UnaryCallSettings - getBatchPredictionJobSettings() { - return getBatchPredictionJobSettings; - } - - /** Returns the object with the settings used for calls to listBatchPredictionJobs. */ - public PagedCallSettings< - ListBatchPredictionJobsRequest, - ListBatchPredictionJobsResponse, - ListBatchPredictionJobsPagedResponse> - listBatchPredictionJobsSettings() { - return listBatchPredictionJobsSettings; - } - - /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ - public UnaryCallSettings - deleteBatchPredictionJobSettings() { - return deleteBatchPredictionJobSettings; - } - - /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteBatchPredictionJobOperationSettings() { - return deleteBatchPredictionJobOperationSettings; - } - - /** Returns the object with the settings used for calls to cancelBatchPredictionJob. */ - public UnaryCallSettings - cancelBatchPredictionJobSettings() { - return cancelBatchPredictionJobSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public JobServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcJobServiceStub.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 "aiplatform.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(JobServiceStubSettings.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 JobServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createCustomJobSettings = settingsBuilder.createCustomJobSettings().build(); - getCustomJobSettings = settingsBuilder.getCustomJobSettings().build(); - listCustomJobsSettings = settingsBuilder.listCustomJobsSettings().build(); - deleteCustomJobSettings = settingsBuilder.deleteCustomJobSettings().build(); - deleteCustomJobOperationSettings = settingsBuilder.deleteCustomJobOperationSettings().build(); - cancelCustomJobSettings = settingsBuilder.cancelCustomJobSettings().build(); - createDataLabelingJobSettings = settingsBuilder.createDataLabelingJobSettings().build(); - getDataLabelingJobSettings = settingsBuilder.getDataLabelingJobSettings().build(); - listDataLabelingJobsSettings = settingsBuilder.listDataLabelingJobsSettings().build(); - deleteDataLabelingJobSettings = settingsBuilder.deleteDataLabelingJobSettings().build(); - deleteDataLabelingJobOperationSettings = - settingsBuilder.deleteDataLabelingJobOperationSettings().build(); - cancelDataLabelingJobSettings = settingsBuilder.cancelDataLabelingJobSettings().build(); - createHyperparameterTuningJobSettings = - settingsBuilder.createHyperparameterTuningJobSettings().build(); - getHyperparameterTuningJobSettings = - settingsBuilder.getHyperparameterTuningJobSettings().build(); - listHyperparameterTuningJobsSettings = - settingsBuilder.listHyperparameterTuningJobsSettings().build(); - deleteHyperparameterTuningJobSettings = - settingsBuilder.deleteHyperparameterTuningJobSettings().build(); - deleteHyperparameterTuningJobOperationSettings = - settingsBuilder.deleteHyperparameterTuningJobOperationSettings().build(); - cancelHyperparameterTuningJobSettings = - settingsBuilder.cancelHyperparameterTuningJobSettings().build(); - createBatchPredictionJobSettings = settingsBuilder.createBatchPredictionJobSettings().build(); - getBatchPredictionJobSettings = settingsBuilder.getBatchPredictionJobSettings().build(); - listBatchPredictionJobsSettings = settingsBuilder.listBatchPredictionJobsSettings().build(); - deleteBatchPredictionJobSettings = settingsBuilder.deleteBatchPredictionJobSettings().build(); - deleteBatchPredictionJobOperationSettings = - settingsBuilder.deleteBatchPredictionJobOperationSettings().build(); - cancelBatchPredictionJobSettings = settingsBuilder.cancelBatchPredictionJobSettings().build(); - } - private static final PagedListDescriptor LIST_CUSTOM_JOBS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -468,9 +213,9 @@ public String extractNextToken(ListCustomJobsResponse payload) { @Override public Iterable extractResources(ListCustomJobsResponse payload) { - return payload.getCustomJobsList() != null - ? payload.getCustomJobsList() - : ImmutableList.of(); + return payload.getCustomJobsList() == null + ? ImmutableList.of() + : payload.getCustomJobsList(); } }; @@ -509,9 +254,9 @@ public String extractNextToken(ListDataLabelingJobsResponse payload) { @Override public Iterable extractResources( ListDataLabelingJobsResponse payload) { - return payload.getDataLabelingJobsList() != null - ? payload.getDataLabelingJobsList() - : ImmutableList.of(); + return payload.getDataLabelingJobsList() == null + ? ImmutableList.of() + : payload.getDataLabelingJobsList(); } }; @@ -558,9 +303,9 @@ public String extractNextToken(ListHyperparameterTuningJobsResponse payload) { @Override public Iterable extractResources( ListHyperparameterTuningJobsResponse payload) { - return payload.getHyperparameterTuningJobsList() != null - ? payload.getHyperparameterTuningJobsList() - : ImmutableList.of(); + return payload.getHyperparameterTuningJobsList() == null + ? ImmutableList.of() + : payload.getHyperparameterTuningJobsList(); } }; @@ -603,9 +348,9 @@ public String extractNextToken(ListBatchPredictionJobsResponse payload) { @Override public Iterable extractResources( ListBatchPredictionJobsResponse payload) { - return payload.getBatchPredictionJobsList() != null - ? payload.getBatchPredictionJobsList() - : ImmutableList.of(); + return payload.getBatchPredictionJobsList() == null + ? ImmutableList.of() + : payload.getBatchPredictionJobsList(); } }; @@ -709,12 +454,263 @@ public ApiFuture getFuturePagedResponse( } }; - /** Builder for JobServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - - private final UnaryCallSettings.Builder - createCustomJobSettings; + /** Returns the object with the settings used for calls to createCustomJob. */ + public UnaryCallSettings createCustomJobSettings() { + return createCustomJobSettings; + } + + /** Returns the object with the settings used for calls to getCustomJob. */ + public UnaryCallSettings getCustomJobSettings() { + return getCustomJobSettings; + } + + /** Returns the object with the settings used for calls to listCustomJobs. */ + public PagedCallSettings< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + listCustomJobsSettings() { + return listCustomJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteCustomJob. */ + public UnaryCallSettings deleteCustomJobSettings() { + return deleteCustomJobSettings; + } + + /** Returns the object with the settings used for calls to deleteCustomJob. */ + public OperationCallSettings + deleteCustomJobOperationSettings() { + return deleteCustomJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelCustomJob. */ + public UnaryCallSettings cancelCustomJobSettings() { + return cancelCustomJobSettings; + } + + /** Returns the object with the settings used for calls to createDataLabelingJob. */ + public UnaryCallSettings + createDataLabelingJobSettings() { + return createDataLabelingJobSettings; + } + + /** Returns the object with the settings used for calls to getDataLabelingJob. */ + public UnaryCallSettings + getDataLabelingJobSettings() { + return getDataLabelingJobSettings; + } + + /** Returns the object with the settings used for calls to listDataLabelingJobs. */ + public PagedCallSettings< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings() { + return listDataLabelingJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ + public UnaryCallSettings + deleteDataLabelingJobSettings() { + return deleteDataLabelingJobSettings; + } + + /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ + public OperationCallSettings + deleteDataLabelingJobOperationSettings() { + return deleteDataLabelingJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelDataLabelingJob. */ + public UnaryCallSettings cancelDataLabelingJobSettings() { + return cancelDataLabelingJobSettings; + } + + /** Returns the object with the settings used for calls to createHyperparameterTuningJob. */ + public UnaryCallSettings + createHyperparameterTuningJobSettings() { + return createHyperparameterTuningJobSettings; + } + + /** Returns the object with the settings used for calls to getHyperparameterTuningJob. */ + public UnaryCallSettings + getHyperparameterTuningJobSettings() { + return getHyperparameterTuningJobSettings; + } + + /** Returns the object with the settings used for calls to listHyperparameterTuningJobs. */ + public PagedCallSettings< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings() { + return listHyperparameterTuningJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ + public UnaryCallSettings + deleteHyperparameterTuningJobSettings() { + return deleteHyperparameterTuningJobSettings; + } + + /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ + public OperationCallSettings + deleteHyperparameterTuningJobOperationSettings() { + return deleteHyperparameterTuningJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelHyperparameterTuningJob. */ + public UnaryCallSettings + cancelHyperparameterTuningJobSettings() { + return cancelHyperparameterTuningJobSettings; + } + + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ + public UnaryCallSettings + createBatchPredictionJobSettings() { + return createBatchPredictionJobSettings; + } + + /** Returns the object with the settings used for calls to getBatchPredictionJob. */ + public UnaryCallSettings + getBatchPredictionJobSettings() { + return getBatchPredictionJobSettings; + } + + /** Returns the object with the settings used for calls to listBatchPredictionJobs. */ + public PagedCallSettings< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings() { + return listBatchPredictionJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ + public UnaryCallSettings + deleteBatchPredictionJobSettings() { + return deleteBatchPredictionJobSettings; + } + + /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ + public OperationCallSettings + deleteBatchPredictionJobOperationSettings() { + return deleteBatchPredictionJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelBatchPredictionJob. */ + public UnaryCallSettings + cancelBatchPredictionJobSettings() { + return cancelBatchPredictionJobSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public JobServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcJobServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", 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 "aiplatform.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(JobServiceStubSettings.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 JobServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createCustomJobSettings = settingsBuilder.createCustomJobSettings().build(); + getCustomJobSettings = settingsBuilder.getCustomJobSettings().build(); + listCustomJobsSettings = settingsBuilder.listCustomJobsSettings().build(); + deleteCustomJobSettings = settingsBuilder.deleteCustomJobSettings().build(); + deleteCustomJobOperationSettings = settingsBuilder.deleteCustomJobOperationSettings().build(); + cancelCustomJobSettings = settingsBuilder.cancelCustomJobSettings().build(); + createDataLabelingJobSettings = settingsBuilder.createDataLabelingJobSettings().build(); + getDataLabelingJobSettings = settingsBuilder.getDataLabelingJobSettings().build(); + listDataLabelingJobsSettings = settingsBuilder.listDataLabelingJobsSettings().build(); + deleteDataLabelingJobSettings = settingsBuilder.deleteDataLabelingJobSettings().build(); + deleteDataLabelingJobOperationSettings = + settingsBuilder.deleteDataLabelingJobOperationSettings().build(); + cancelDataLabelingJobSettings = settingsBuilder.cancelDataLabelingJobSettings().build(); + createHyperparameterTuningJobSettings = + settingsBuilder.createHyperparameterTuningJobSettings().build(); + getHyperparameterTuningJobSettings = + settingsBuilder.getHyperparameterTuningJobSettings().build(); + listHyperparameterTuningJobsSettings = + settingsBuilder.listHyperparameterTuningJobsSettings().build(); + deleteHyperparameterTuningJobSettings = + settingsBuilder.deleteHyperparameterTuningJobSettings().build(); + deleteHyperparameterTuningJobOperationSettings = + settingsBuilder.deleteHyperparameterTuningJobOperationSettings().build(); + cancelHyperparameterTuningJobSettings = + settingsBuilder.cancelHyperparameterTuningJobSettings().build(); + createBatchPredictionJobSettings = settingsBuilder.createBatchPredictionJobSettings().build(); + getBatchPredictionJobSettings = settingsBuilder.getBatchPredictionJobSettings().build(); + listBatchPredictionJobsSettings = settingsBuilder.listBatchPredictionJobsSettings().build(); + deleteBatchPredictionJobSettings = settingsBuilder.deleteBatchPredictionJobSettings().build(); + deleteBatchPredictionJobOperationSettings = + settingsBuilder.deleteBatchPredictionJobOperationSettings().build(); + cancelBatchPredictionJobSettings = settingsBuilder.cancelBatchPredictionJobSettings().build(); + } + + /** Builder for JobServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createCustomJobSettings; private final UnaryCallSettings.Builder getCustomJobSettings; private final PagedCallSettings.Builder< ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> @@ -775,7 +771,6 @@ public static class Builder extends StubSettings.Builder cancelBatchPredictionJobSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -784,19 +779,6 @@ public static class Builder extends StubSettings.BuildernewArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -805,40 +787,6 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_5_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_4_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(5000L)) @@ -847,81 +795,42 @@ public static class Builder extends StubSettings.Builder>of( + createCustomJobSettings, + getCustomJobSettings, + listCustomJobsSettings, + deleteCustomJobSettings, + cancelCustomJobSettings, + createDataLabelingJobSettings, + getDataLabelingJobSettings, + listDataLabelingJobsSettings, + deleteDataLabelingJobSettings, + cancelDataLabelingJobSettings, + createHyperparameterTuningJobSettings, + getHyperparameterTuningJobSettings, + listHyperparameterTuningJobsSettings, + deleteHyperparameterTuningJobSettings, + cancelHyperparameterTuningJobSettings, + createBatchPredictionJobSettings, + getBatchPredictionJobSettings, + listBatchPredictionJobsSettings, + deleteBatchPredictionJobSettings, + cancelBatchPredictionJobSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .createCustomJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .getCustomJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .listCustomJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .deleteCustomJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .cancelCustomJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .createDataLabelingJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .getDataLabelingJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .listDataLabelingJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .deleteDataLabelingJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .cancelDataLabelingJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .createHyperparameterTuningJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .getHyperparameterTuningJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .listHyperparameterTuningJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .deleteHyperparameterTuningJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .cancelHyperparameterTuningJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .createBatchPredictionJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .getBatchPredictionJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .listBatchPredictionJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .deleteBatchPredictionJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); builder .cancelBatchPredictionJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder .deleteCustomJobOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -1075,21 +1044,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteDataLabelingJobOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -1098,22 +1068,23 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteHyperparameterTuningJobOperationSettings() .setInitialCallSettings( UnaryCallSettings . newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -1122,21 +1093,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteBatchPredictionJobOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -1145,78 +1117,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(JobServiceStubSettings settings) { - super(settings); - - createCustomJobSettings = settings.createCustomJobSettings.toBuilder(); - getCustomJobSettings = settings.getCustomJobSettings.toBuilder(); - listCustomJobsSettings = settings.listCustomJobsSettings.toBuilder(); - deleteCustomJobSettings = settings.deleteCustomJobSettings.toBuilder(); - deleteCustomJobOperationSettings = settings.deleteCustomJobOperationSettings.toBuilder(); - cancelCustomJobSettings = settings.cancelCustomJobSettings.toBuilder(); - createDataLabelingJobSettings = settings.createDataLabelingJobSettings.toBuilder(); - getDataLabelingJobSettings = settings.getDataLabelingJobSettings.toBuilder(); - listDataLabelingJobsSettings = settings.listDataLabelingJobsSettings.toBuilder(); - deleteDataLabelingJobSettings = settings.deleteDataLabelingJobSettings.toBuilder(); - deleteDataLabelingJobOperationSettings = - settings.deleteDataLabelingJobOperationSettings.toBuilder(); - cancelDataLabelingJobSettings = settings.cancelDataLabelingJobSettings.toBuilder(); - createHyperparameterTuningJobSettings = - settings.createHyperparameterTuningJobSettings.toBuilder(); - getHyperparameterTuningJobSettings = settings.getHyperparameterTuningJobSettings.toBuilder(); - listHyperparameterTuningJobsSettings = - settings.listHyperparameterTuningJobsSettings.toBuilder(); - deleteHyperparameterTuningJobSettings = - settings.deleteHyperparameterTuningJobSettings.toBuilder(); - deleteHyperparameterTuningJobOperationSettings = - settings.deleteHyperparameterTuningJobOperationSettings.toBuilder(); - cancelHyperparameterTuningJobSettings = - settings.cancelHyperparameterTuningJobSettings.toBuilder(); - createBatchPredictionJobSettings = settings.createBatchPredictionJobSettings.toBuilder(); - getBatchPredictionJobSettings = settings.getBatchPredictionJobSettings.toBuilder(); - listBatchPredictionJobsSettings = settings.listBatchPredictionJobsSettings.toBuilder(); - deleteBatchPredictionJobSettings = settings.deleteBatchPredictionJobSettings.toBuilder(); - deleteBatchPredictionJobOperationSettings = - settings.deleteBatchPredictionJobOperationSettings.toBuilder(); - cancelBatchPredictionJobSettings = settings.cancelBatchPredictionJobSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createCustomJobSettings, - getCustomJobSettings, - listCustomJobsSettings, - deleteCustomJobSettings, - cancelCustomJobSettings, - createDataLabelingJobSettings, - getDataLabelingJobSettings, - listDataLabelingJobsSettings, - deleteDataLabelingJobSettings, - cancelDataLabelingJobSettings, - createHyperparameterTuningJobSettings, - getHyperparameterTuningJobSettings, - listHyperparameterTuningJobsSettings, - deleteHyperparameterTuningJobSettings, - cancelHyperparameterTuningJobSettings, - createBatchPredictionJobSettings, - getBatchPredictionJobSettings, - listBatchPredictionJobsSettings, - deleteBatchPredictionJobSettings, - cancelBatchPredictionJobSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStub.java index 14be4ff29..18d58132f 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; -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; @@ -30,17 +30,15 @@ import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the MigrationService service 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 MigrationServiceStub 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()"); } @@ -56,7 +54,6 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: searchMigratableResourcesCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< BatchMigrateResourcesRequest, BatchMigrateResourcesResponse, diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStubSettings.java index 35a378de5..b43434fd5 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/MigrationServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; @@ -59,7 +60,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link MigrationServiceStub}. * @@ -76,22 +77,23 @@ * *

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

- * 
+ * 
{@code
  * MigrationServiceStubSettings.Builder migrationServiceSettingsBuilder =
  *     MigrationServiceStubSettings.newBuilder();
  * migrationServiceSettingsBuilder
  *     .searchMigratableResourcesSettings()
  *     .setRetrySettings(
- *         migrationServiceSettingsBuilder.searchMigratableResourcesSettings().getRetrySettings().toBuilder()
+ *         migrationServiceSettingsBuilder
+ *             .searchMigratableResourcesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * MigrationServiceStubSettings migrationServiceSettings = migrationServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class MigrationServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -110,6 +112,81 @@ public class MigrationServiceStubSettings extends StubSettings batchMigrateResourcesOperationSettings; + private static final PagedListDescriptor< + SearchMigratableResourcesRequest, SearchMigratableResourcesResponse, MigratableResource> + SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchMigratableResourcesRequest injectToken( + SearchMigratableResourcesRequest payload, String token) { + return SearchMigratableResourcesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchMigratableResourcesRequest injectPageSize( + SearchMigratableResourcesRequest payload, int pageSize) { + return SearchMigratableResourcesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(SearchMigratableResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchMigratableResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchMigratableResourcesResponse payload) { + return payload.getMigratableResourcesList() == null + ? ImmutableList.of() + : payload.getMigratableResourcesList(); + } + }; + + private static final PagedListResponseFactory< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + SearchMigratableResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource> + pageContext = + PageContext.create( + callable, SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_DESC, request, context); + return SearchMigratableResourcesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to searchMigratableResources. */ public PagedCallSettings< SearchMigratableResourcesRequest, @@ -126,7 +203,6 @@ public class MigrationServiceStubSettings extends StubSettings - SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchMigratableResourcesRequest, - SearchMigratableResourcesResponse, - MigratableResource>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchMigratableResourcesRequest injectToken( - SearchMigratableResourcesRequest payload, String token) { - return SearchMigratableResourcesRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } - - @Override - public SearchMigratableResourcesRequest injectPageSize( - SearchMigratableResourcesRequest payload, int pageSize) { - return SearchMigratableResourcesRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(SearchMigratableResourcesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchMigratableResourcesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchMigratableResourcesResponse payload) { - return payload.getMigratableResourcesList() != null - ? payload.getMigratableResourcesList() - : ImmutableList.of(); - } - }; - - private static final PagedListResponseFactory< - SearchMigratableResourcesRequest, - SearchMigratableResourcesResponse, - SearchMigratableResourcesPagedResponse> - SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchMigratableResourcesRequest, - SearchMigratableResourcesResponse, - SearchMigratableResourcesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - SearchMigratableResourcesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchMigratableResourcesRequest, - SearchMigratableResourcesResponse, - MigratableResource> - pageContext = - PageContext.create( - callable, SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_DESC, request, context); - return SearchMigratableResourcesPagedResponse.createAsync( - pageContext, futureResponse); - } - }; - /** Builder for MigrationServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< SearchMigratableResourcesRequest, SearchMigratableResourcesResponse, @@ -301,28 +301,13 @@ public static class Builder extends StubSettings.Builder batchMigrateResourcesOperationSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -331,69 +316,13 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_5_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_4_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_2_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_6_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_7_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } protected Builder() { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { @@ -401,29 +330,40 @@ protected Builder(ClientContext clientContext) { searchMigratableResourcesSettings = PagedCallSettings.newBuilder(SEARCH_MIGRATABLE_RESOURCES_PAGE_STR_FACT); - batchMigrateResourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchMigrateResourcesOperationSettings = OperationCallSettings.newBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( searchMigratableResourcesSettings, batchMigrateResourcesSettings); - initDefaults(this); } + protected Builder(MigrationServiceStubSettings settings) { + super(settings); + + searchMigratableResourcesSettings = settings.searchMigratableResourcesSettings.toBuilder(); + batchMigrateResourcesSettings = settings.batchMigrateResourcesSettings.toBuilder(); + batchMigrateResourcesOperationSettings = + settings.batchMigrateResourcesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + searchMigratableResourcesSettings, batchMigrateResourcesSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .searchMigratableResourcesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -433,6 +373,7 @@ private static Builder initDefaults(Builder builder) { .batchMigrateResourcesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .batchMigrateResourcesOperationSettings() .setInitialCallSettings( @@ -450,32 +391,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(MigrationServiceStubSettings settings) { - super(settings); - - searchMigratableResourcesSettings = settings.searchMigratableResourcesSettings.toBuilder(); - batchMigrateResourcesSettings = settings.batchMigrateResourcesSettings.toBuilder(); - batchMigrateResourcesOperationSettings = - settings.batchMigrateResourcesOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - searchMigratableResourcesSettings, batchMigrateResourcesSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java index 343565340..04ee41e41 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.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; @@ -49,22 +49,19 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the ModelService service 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 ModelServiceStub 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()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable uploadModelOperationCallable() { throw new UnsupportedOperationException("Not implemented: uploadModelOperationCallable()"); @@ -90,7 +87,6 @@ public UnaryCallable updateModelCallable() { throw new UnsupportedOperationException("Not implemented: updateModelCallable()"); } - @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()"); @@ -100,7 +96,6 @@ public UnaryCallable deleteModelCallable() { throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable exportModelOperationCallable() { throw new UnsupportedOperationException("Not implemented: exportModelOperationCallable()"); diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java index 8a2036e8d..bccebc101 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; @@ -77,7 +78,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link ModelServiceStub}. * @@ -94,22 +95,23 @@ * *

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

- * 
+ * 
{@code
  * ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
  *     ModelServiceStubSettings.newBuilder();
  * modelServiceSettingsBuilder
  *     .getModelSettings()
  *     .setRetrySettings(
- *         modelServiceSettingsBuilder.getModelSettings().getRetrySettings().toBuilder()
+ *         modelServiceSettingsBuilder
+ *             .getModelSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class ModelServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -145,174 +147,6 @@ public class ModelServiceStubSettings extends StubSettings listModelEvaluationSlicesSettings; - /** Returns the object with the settings used for calls to uploadModel. */ - public UnaryCallSettings uploadModelSettings() { - return uploadModelSettings; - } - - /** Returns the object with the settings used for calls to uploadModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings< - UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> - uploadModelOperationSettings() { - return uploadModelOperationSettings; - } - - /** 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 listModels. */ - public PagedCallSettings - listModelsSettings() { - return listModelsSettings; - } - - /** 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 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 exportModel. */ - public UnaryCallSettings exportModelSettings() { - return exportModelSettings; - } - - /** Returns the object with the settings used for calls to exportModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings< - ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> - exportModelOperationSettings() { - return exportModelOperationSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to getModelEvaluationSlice. */ - public UnaryCallSettings - getModelEvaluationSliceSettings() { - return getModelEvaluationSliceSettings; - } - - /** Returns the object with the settings used for calls to listModelEvaluationSlices. */ - public PagedCallSettings< - ListModelEvaluationSlicesRequest, - ListModelEvaluationSlicesResponse, - ListModelEvaluationSlicesPagedResponse> - listModelEvaluationSlicesSettings() { - return listModelEvaluationSlicesSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ModelServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcModelServiceStub.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 "aiplatform.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(ModelServiceStubSettings.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 ModelServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - uploadModelSettings = settingsBuilder.uploadModelSettings().build(); - uploadModelOperationSettings = settingsBuilder.uploadModelOperationSettings().build(); - getModelSettings = settingsBuilder.getModelSettings().build(); - listModelsSettings = settingsBuilder.listModelsSettings().build(); - updateModelSettings = settingsBuilder.updateModelSettings().build(); - deleteModelSettings = settingsBuilder.deleteModelSettings().build(); - deleteModelOperationSettings = settingsBuilder.deleteModelOperationSettings().build(); - exportModelSettings = settingsBuilder.exportModelSettings().build(); - exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); - getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); - listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); - getModelEvaluationSliceSettings = settingsBuilder.getModelEvaluationSliceSettings().build(); - listModelEvaluationSlicesSettings = settingsBuilder.listModelEvaluationSlicesSettings().build(); - } - private static final PagedListDescriptor LIST_MODELS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -343,9 +177,9 @@ public String extractNextToken(ListModelsResponse payload) { @Override public Iterable extractResources(ListModelsResponse payload) { - return payload.getModelsList() != null - ? payload.getModelsList() - : ImmutableList.of(); + return payload.getModelsList() == null + ? ImmutableList.of() + : payload.getModelsList(); } }; @@ -384,9 +218,9 @@ public String extractNextToken(ListModelEvaluationsResponse payload) { @Override public Iterable extractResources( ListModelEvaluationsResponse payload) { - return payload.getModelEvaluationsList() != null - ? payload.getModelEvaluationsList() - : ImmutableList.of(); + return payload.getModelEvaluationsList() == null + ? ImmutableList.of() + : payload.getModelEvaluationsList(); } }; @@ -431,9 +265,9 @@ public String extractNextToken(ListModelEvaluationSlicesResponse payload) { @Override public Iterable extractResources( ListModelEvaluationSlicesResponse payload) { - return payload.getModelEvaluationSlicesList() != null - ? payload.getModelEvaluationSlicesList() - : ImmutableList.of(); + return payload.getModelEvaluationSlicesList() == null + ? ImmutableList.of() + : payload.getModelEvaluationSlicesList(); } }; @@ -506,10 +340,174 @@ public ApiFuture getFuturePagedResponse( } }; + /** Returns the object with the settings used for calls to uploadModel. */ + public UnaryCallSettings uploadModelSettings() { + return uploadModelSettings; + } + + /** Returns the object with the settings used for calls to uploadModel. */ + public OperationCallSettings< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationSettings() { + return uploadModelOperationSettings; + } + + /** 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 listModels. */ + public PagedCallSettings + listModelsSettings() { + return listModelsSettings; + } + + /** 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 deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public OperationCallSettings + deleteModelOperationSettings() { + return deleteModelOperationSettings; + } + + /** Returns the object with the settings used for calls to exportModel. */ + public UnaryCallSettings exportModelSettings() { + return exportModelSettings; + } + + /** Returns the object with the settings used for calls to exportModel. */ + public OperationCallSettings< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings() { + return exportModelOperationSettings; + } + + /** 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; + } + + /** Returns the object with the settings used for calls to getModelEvaluationSlice. */ + public UnaryCallSettings + getModelEvaluationSliceSettings() { + return getModelEvaluationSliceSettings; + } + + /** Returns the object with the settings used for calls to listModelEvaluationSlices. */ + public PagedCallSettings< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings() { + return listModelEvaluationSlicesSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ModelServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcModelServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", 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 "aiplatform.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(ModelServiceStubSettings.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 ModelServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + uploadModelSettings = settingsBuilder.uploadModelSettings().build(); + uploadModelOperationSettings = settingsBuilder.uploadModelOperationSettings().build(); + getModelSettings = settingsBuilder.getModelSettings().build(); + listModelsSettings = settingsBuilder.listModelsSettings().build(); + updateModelSettings = settingsBuilder.updateModelSettings().build(); + deleteModelSettings = settingsBuilder.deleteModelSettings().build(); + deleteModelOperationSettings = settingsBuilder.deleteModelOperationSettings().build(); + exportModelSettings = settingsBuilder.exportModelSettings().build(); + exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); + getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); + listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); + getModelEvaluationSliceSettings = settingsBuilder.getModelEvaluationSliceSettings().build(); + listModelEvaluationSlicesSettings = settingsBuilder.listModelEvaluationSlicesSettings().build(); + } + /** Builder for ModelServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder uploadModelSettings; private final OperationCallSettings.Builder< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> @@ -540,28 +538,14 @@ public static class Builder extends StubSettings.Builder listModelEvaluationSlicesSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -578,91 +562,29 @@ public static class Builder extends StubSettings.Builder>of( + uploadModelSettings, + getModelSettings, + listModelsSettings, + updateModelSettings, + deleteModelSettings, + exportModelSettings, + getModelEvaluationSettings, + listModelEvaluationsSettings, + getModelEvaluationSliceSettings, + listModelEvaluationSlicesSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .uploadModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .getModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .listModelsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .updateModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .deleteModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .exportModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .getModelEvaluationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .listModelEvaluationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .getModelEvaluationSliceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); builder .listModelEvaluationSlicesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + builder .uploadModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(UploadModelResponse.class)) @@ -757,20 +711,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -779,20 +734,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .exportModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ExportModelResponse.class)) @@ -802,50 +758,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(ModelServiceStubSettings settings) { - super(settings); - - uploadModelSettings = settings.uploadModelSettings.toBuilder(); - uploadModelOperationSettings = settings.uploadModelOperationSettings.toBuilder(); - getModelSettings = settings.getModelSettings.toBuilder(); - listModelsSettings = settings.listModelsSettings.toBuilder(); - updateModelSettings = settings.updateModelSettings.toBuilder(); - deleteModelSettings = settings.deleteModelSettings.toBuilder(); - deleteModelOperationSettings = settings.deleteModelOperationSettings.toBuilder(); - exportModelSettings = settings.exportModelSettings.toBuilder(); - exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); - getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder(); - listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder(); - getModelEvaluationSliceSettings = settings.getModelEvaluationSliceSettings.toBuilder(); - listModelEvaluationSlicesSettings = settings.listModelEvaluationSlicesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - uploadModelSettings, - getModelSettings, - listModelsSettings, - updateModelSettings, - deleteModelSettings, - exportModelSettings, - getModelEvaluationSettings, - listModelEvaluationsSettings, - getModelEvaluationSliceSettings, - listModelEvaluationSlicesSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java index db4e55b09..f0520c87a 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; -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; @@ -34,17 +34,15 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the PipelineService service 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 PipelineServiceStub 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()"); } @@ -69,7 +67,6 @@ public UnaryCallable getTrainingPi throw new UnsupportedOperationException("Not implemented: listTrainingPipelinesCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteTrainingPipelineOperationCallable() { throw new UnsupportedOperationException( diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java index 0fd3abaef..e469a7986 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; @@ -62,7 +63,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link PipelineServiceStub}. * @@ -79,22 +80,23 @@ * *

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

- * 
+ * 
{@code
  * PipelineServiceStubSettings.Builder pipelineServiceSettingsBuilder =
  *     PipelineServiceStubSettings.newBuilder();
  * pipelineServiceSettingsBuilder
  *     .createTrainingPipelineSettings()
  *     .setRetrySettings(
- *         pipelineServiceSettingsBuilder.createTrainingPipelineSettings().getRetrySettings().toBuilder()
+ *         pipelineServiceSettingsBuilder
+ *             .createTrainingPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PipelineServiceStubSettings pipelineServiceSettings = pipelineServiceSettingsBuilder.build();
- * 
- * 
+ * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class PipelineServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -116,6 +118,71 @@ public class PipelineServiceStubSettings extends StubSettings cancelTrainingPipelineSettings; + private static final PagedListDescriptor< + ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline> + LIST_TRAINING_PIPELINES_PAGE_STR_DESC = + new PagedListDescriptor< + ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTrainingPipelinesRequest injectToken( + ListTrainingPipelinesRequest payload, String token) { + return ListTrainingPipelinesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTrainingPipelinesRequest injectPageSize( + ListTrainingPipelinesRequest payload, int pageSize) { + return ListTrainingPipelinesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTrainingPipelinesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTrainingPipelinesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListTrainingPipelinesResponse payload) { + return payload.getTrainingPipelinesList() == null + ? ImmutableList.of() + : payload.getTrainingPipelinesList(); + } + }; + + private static final PagedListResponseFactory< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + LIST_TRAINING_PIPELINES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTrainingPipelinesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline> + pageContext = + PageContext.create( + callable, LIST_TRAINING_PIPELINES_PAGE_STR_DESC, request, context); + return ListTrainingPipelinesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createTrainingPipeline. */ public UnaryCallSettings createTrainingPipelineSettings() { @@ -144,7 +211,6 @@ public class PipelineServiceStubSettings extends StubSettings deleteTrainingPipelineOperationSettings() { return deleteTrainingPipelineOperationSettings; @@ -161,10 +227,10 @@ public PipelineServiceStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcPipelineServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -233,75 +299,9 @@ protected PipelineServiceStubSettings(Builder settingsBuilder) throws IOExceptio cancelTrainingPipelineSettings = settingsBuilder.cancelTrainingPipelineSettings().build(); } - private static final PagedListDescriptor< - ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline> - LIST_TRAINING_PIPELINES_PAGE_STR_DESC = - new PagedListDescriptor< - ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListTrainingPipelinesRequest injectToken( - ListTrainingPipelinesRequest payload, String token) { - return ListTrainingPipelinesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListTrainingPipelinesRequest injectPageSize( - ListTrainingPipelinesRequest payload, int pageSize) { - return ListTrainingPipelinesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListTrainingPipelinesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListTrainingPipelinesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListTrainingPipelinesResponse payload) { - return payload.getTrainingPipelinesList() != null - ? payload.getTrainingPipelinesList() - : ImmutableList.of(); - } - }; - - private static final PagedListResponseFactory< - ListTrainingPipelinesRequest, - ListTrainingPipelinesResponse, - ListTrainingPipelinesPagedResponse> - LIST_TRAINING_PIPELINES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListTrainingPipelinesRequest, - ListTrainingPipelinesResponse, - ListTrainingPipelinesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListTrainingPipelinesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListTrainingPipelinesRequest, ListTrainingPipelinesResponse, TrainingPipeline> - pageContext = - PageContext.create( - callable, LIST_TRAINING_PIPELINES_PAGE_STR_DESC, request, context); - return ListTrainingPipelinesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Builder for PipelineServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createTrainingPipelineSettings; private final UnaryCallSettings.Builder @@ -318,28 +318,14 @@ public static class Builder extends StubSettings.Builder cancelTrainingPipelineSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -348,32 +334,6 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_5_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_1_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(5000L)) @@ -382,51 +342,22 @@ public static class Builder extends StubSettings.Builder>of( + createTrainingPipelineSettings, + getTrainingPipelineSettings, + listTrainingPipelinesSettings, + deleteTrainingPipelineSettings, + cancelTrainingPipelineSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .createTrainingPipelineSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); builder .getTrainingPipelineSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); builder .listTrainingPipelinesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); builder .deleteTrainingPipelineSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); builder .cancelTrainingPipelineSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + builder .deleteTrainingPipelineOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -490,39 +442,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(PipelineServiceStubSettings settings) { - super(settings); - - createTrainingPipelineSettings = settings.createTrainingPipelineSettings.toBuilder(); - getTrainingPipelineSettings = settings.getTrainingPipelineSettings.toBuilder(); - listTrainingPipelinesSettings = settings.listTrainingPipelinesSettings.toBuilder(); - deleteTrainingPipelineSettings = settings.deleteTrainingPipelineSettings.toBuilder(); - deleteTrainingPipelineOperationSettings = - settings.deleteTrainingPipelineOperationSettings.toBuilder(); - cancelTrainingPipelineSettings = settings.cancelTrainingPipelineSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createTrainingPipelineSettings, - getTrainingPipelineSettings, - listTrainingPipelinesSettings, - deleteTrainingPipelineSettings, - cancelTrainingPipelineSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java index 31374a757..8839170a4 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.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.aiplatform.v1beta1.ExplainRequest; @@ -24,14 +24,13 @@ import com.google.cloud.aiplatform.v1beta1.PredictResponse; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the PredictionService service 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() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java index bff716006..32b5fd5b5 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import com.google.api.core.ApiFunction; @@ -43,7 +44,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link PredictionServiceStub}. * @@ -60,22 +61,24 @@ * *

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

- * 
+ * 
{@code
  * PredictionServiceStubSettings.Builder predictionServiceSettingsBuilder =
  *     PredictionServiceStubSettings.newBuilder();
  * predictionServiceSettingsBuilder
  *     .predictSettings()
  *     .setRetrySettings(
- *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
+ *         predictionServiceSettingsBuilder
+ *             .predictSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
- * PredictionServiceStubSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
- * 
- * 
+ * PredictionServiceStubSettings predictionServiceSettings = + * predictionServiceSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class PredictionServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -100,10 +103,10 @@ public PredictionServiceStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcPredictionServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -170,29 +173,14 @@ protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOExcept /** Builder for PredictionServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder predictSettings; private final UnaryCallSettings.Builder explainSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); @@ -203,16 +191,6 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(5000L)) @@ -221,101 +199,60 @@ public static class Builder extends StubSettings.Builder>of(predictSettings, explainSettings); - initDefaults(this); } + protected Builder(PredictionServiceStubSettings settings) { + super(settings); + + predictSettings = settings.predictSettings.toBuilder(); + explainSettings = settings.explainSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(predictSettings, explainSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); builder .explainSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); return builder; } - protected Builder(PredictionServiceStubSettings settings) { - super(settings); - - predictSettings = settings.predictSettings.toBuilder(); - explainSettings = settings.explainSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(predictSettings, explainSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStub.java index eacdde96f..03588d0b4 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStub.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; -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; @@ -36,22 +36,19 @@ import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Cloud AI Platform API. + * Base stub class for the SpecialistPoolService service 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 SpecialistPoolServiceStub 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()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationCallable() { @@ -77,7 +74,6 @@ public UnaryCallable getSpecialistPool throw new UnsupportedOperationException("Not implemented: listSpecialistPoolsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable deleteSpecialistPoolOperationCallable() { throw new UnsupportedOperationException( @@ -88,7 +84,6 @@ public UnaryCallable deleteSpecialistPoo throw new UnsupportedOperationException("Not implemented: deleteSpecialistPoolCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationCallable() { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStubSettings.java index 2f249ca9c..5dbb99c4b 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStubSettings.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/SpecialistPoolServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1.stub; import static com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; @@ -64,7 +65,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link SpecialistPoolServiceStub}. * @@ -81,22 +82,24 @@ * *

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

- * 
+ * 
{@code
  * SpecialistPoolServiceStubSettings.Builder specialistPoolServiceSettingsBuilder =
  *     SpecialistPoolServiceStubSettings.newBuilder();
  * specialistPoolServiceSettingsBuilder
  *     .getSpecialistPoolSettings()
  *     .setRetrySettings(
- *         specialistPoolServiceSettingsBuilder.getSpecialistPoolSettings().getRetrySettings().toBuilder()
+ *         specialistPoolServiceSettingsBuilder
+ *             .getSpecialistPoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
- * SpecialistPoolServiceStubSettings specialistPoolServiceSettings = specialistPoolServiceSettingsBuilder.build();
- * 
- * 
+ * SpecialistPoolServiceStubSettings specialistPoolServiceSettings = + * specialistPoolServiceSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class SpecialistPoolServiceStubSettings extends StubSettings { /** The default scopes of the service. */ @@ -123,13 +126,73 @@ public class SpecialistPoolServiceStubSettings UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationSettings; + private static final PagedListDescriptor< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, SpecialistPool> + LIST_SPECIALIST_POOLS_PAGE_STR_DESC = + new PagedListDescriptor< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, SpecialistPool>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSpecialistPoolsRequest injectToken( + ListSpecialistPoolsRequest payload, String token) { + return ListSpecialistPoolsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSpecialistPoolsRequest injectPageSize( + ListSpecialistPoolsRequest payload, int pageSize) { + return ListSpecialistPoolsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSpecialistPoolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSpecialistPoolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSpecialistPoolsResponse payload) { + return payload.getSpecialistPoolsList() == null + ? ImmutableList.of() + : payload.getSpecialistPoolsList(); + } + }; + + private static final PagedListResponseFactory< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, ListSpecialistPoolsPagedResponse> + LIST_SPECIALIST_POOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + ListSpecialistPoolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSpecialistPoolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SPECIALIST_POOLS_PAGE_STR_DESC, request, context); + return ListSpecialistPoolsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createSpecialistPool. */ public UnaryCallSettings createSpecialistPoolSettings() { return createSpecialistPoolSettings; } /** Returns the object with the settings used for calls to createSpecialistPool. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationSettings() { @@ -154,7 +217,6 @@ public UnaryCallSettings deleteSpecialis } /** Returns the object with the settings used for calls to deleteSpecialistPool. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings deleteSpecialistPoolOperationSettings() { return deleteSpecialistPoolOperationSettings; @@ -166,7 +228,6 @@ public UnaryCallSettings updateSpecialis } /** Returns the object with the settings used for calls to updateSpecialistPool. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationSettings() { @@ -179,10 +240,10 @@ public SpecialistPoolServiceStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcSpecialistPoolServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -255,72 +316,10 @@ protected SpecialistPoolServiceStubSettings(Builder settingsBuilder) throws IOEx settingsBuilder.updateSpecialistPoolOperationSettings().build(); } - private static final PagedListDescriptor< - ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, SpecialistPool> - LIST_SPECIALIST_POOLS_PAGE_STR_DESC = - new PagedListDescriptor< - ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, SpecialistPool>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListSpecialistPoolsRequest injectToken( - ListSpecialistPoolsRequest payload, String token) { - return ListSpecialistPoolsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListSpecialistPoolsRequest injectPageSize( - ListSpecialistPoolsRequest payload, int pageSize) { - return ListSpecialistPoolsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListSpecialistPoolsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListSpecialistPoolsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListSpecialistPoolsResponse payload) { - return payload.getSpecialistPoolsList() != null - ? payload.getSpecialistPoolsList() - : ImmutableList.of(); - } - }; - - private static final PagedListResponseFactory< - ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, ListSpecialistPoolsPagedResponse> - LIST_SPECIALIST_POOLS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListSpecialistPoolsRequest, - ListSpecialistPoolsResponse, - ListSpecialistPoolsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListSpecialistPoolsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_SPECIALIST_POOLS_PAGE_STR_DESC, request, context); - return ListSpecialistPoolsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Builder for SpecialistPoolServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createSpecialistPoolSettings; private final OperationCallSettings.Builder< @@ -343,28 +342,14 @@ public static class Builder private final OperationCallSettings.Builder< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -373,48 +358,6 @@ public static class Builder static { ImmutableMap.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_5_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_4_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_2_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(5000L)) @@ -423,39 +366,24 @@ public static class Builder .setTotalTimeout(Duration.ofMillis(5000L)) .build(); definitions.put("no_retry_6_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(5000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(5000L)) - .setTotalTimeout(Duration.ofMillis(5000L)) - .build(); - definitions.put("no_retry_7_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } protected Builder() { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(clientContext); createSpecialistPoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createSpecialistPoolOperationSettings = OperationCallSettings.newBuilder(); - getSpecialistPoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listSpecialistPoolsSettings = PagedCallSettings.newBuilder(LIST_SPECIALIST_POOLS_PAGE_STR_FACT); - deleteSpecialistPoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteSpecialistPoolOperationSettings = OperationCallSettings.newBuilder(); - updateSpecialistPoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateSpecialistPoolOperationSettings = OperationCallSettings.newBuilder(); unaryMethodSettingsBuilders = @@ -465,52 +393,77 @@ protected Builder(ClientContext clientContext) { listSpecialistPoolsSettings, deleteSpecialistPoolSettings, updateSpecialistPoolSettings); - initDefaults(this); } + protected Builder(SpecialistPoolServiceStubSettings settings) { + super(settings); + + createSpecialistPoolSettings = settings.createSpecialistPoolSettings.toBuilder(); + createSpecialistPoolOperationSettings = + settings.createSpecialistPoolOperationSettings.toBuilder(); + getSpecialistPoolSettings = settings.getSpecialistPoolSettings.toBuilder(); + listSpecialistPoolsSettings = settings.listSpecialistPoolsSettings.toBuilder(); + deleteSpecialistPoolSettings = settings.deleteSpecialistPoolSettings.toBuilder(); + deleteSpecialistPoolOperationSettings = + settings.deleteSpecialistPoolOperationSettings.toBuilder(); + updateSpecialistPoolSettings = settings.updateSpecialistPoolSettings.toBuilder(); + updateSpecialistPoolOperationSettings = + settings.updateSpecialistPoolOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createSpecialistPoolSettings, + getSpecialistPoolSettings, + listSpecialistPoolsSettings, + deleteSpecialistPoolSettings, + updateSpecialistPoolSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + 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 .createSpecialistPoolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); builder .getSpecialistPoolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); builder .listSpecialistPoolsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); builder .deleteSpecialistPoolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); builder .updateSpecialistPoolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + builder .createSpecialistPoolOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(SpecialistPool.class)) @@ -520,21 +473,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .deleteSpecialistPoolOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) @@ -543,21 +497,22 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder .updateSpecialistPoolOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(SpecialistPool.class)) @@ -567,43 +522,19 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelay(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) .setTotalTimeout(Duration.ofMillis(300000L)) .build())); return builder; } - protected Builder(SpecialistPoolServiceStubSettings settings) { - super(settings); - - createSpecialistPoolSettings = settings.createSpecialistPoolSettings.toBuilder(); - createSpecialistPoolOperationSettings = - settings.createSpecialistPoolOperationSettings.toBuilder(); - getSpecialistPoolSettings = settings.getSpecialistPoolSettings.toBuilder(); - listSpecialistPoolsSettings = settings.listSpecialistPoolsSettings.toBuilder(); - deleteSpecialistPoolSettings = settings.deleteSpecialistPoolSettings.toBuilder(); - deleteSpecialistPoolOperationSettings = - settings.deleteSpecialistPoolOperationSettings.toBuilder(); - updateSpecialistPoolSettings = settings.updateSpecialistPoolSettings.toBuilder(); - updateSpecialistPoolOperationSettings = - settings.updateSpecialistPoolOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createSpecialistPoolSettings, - getSpecialistPoolSettings, - listSpecialistPoolsSettings, - deleteSpecialistPoolSettings, - updateSpecialistPoolSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/util/ValueConverterTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/util/ValueConverterTest.java new file mode 100644 index 000000000..65901d2a6 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/util/ValueConverterTest.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; + +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType; +import com.google.gson.JsonObject; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.MapEntry; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.util.Collection; +import org.junit.Test; +import org.junit.function.ThrowingRunnable; + +public class ValueConverterTest { + + @Test + public void testValueConverterToValue() throws InvalidProtocolBufferException { + AutoMlImageClassificationInputs testObjectInputs = + AutoMlImageClassificationInputs.newBuilder() + .setModelType(ModelType.CLOUD) + .setBudgetMilliNodeHours(8000) + .setMultiLabel(true) + .setDisableEarlyStopping(false) + .build(); + + Value actualConvertedValue = ValueConverter.toValue(testObjectInputs); + + Struct actualStruct = actualConvertedValue.getStructValue(); + assertEquals(3, actualStruct.getFieldsCount()); + + Collection innerFields = actualStruct.getAllFields().values(); + Collection fieldEntries = (Collection) innerFields.toArray()[0]; + + MapEntry actualBoolValueEntry = null; + MapEntry actualStringValueEntry = null; + MapEntry actualNumberValueEntry = null; + + for (MapEntry entry : fieldEntries) { + String key = entry.getKey().toString(); + if (key.equals("multiLabel")) { + actualBoolValueEntry = entry; + } else if (key.equals("modelType")) { + actualStringValueEntry = entry; + } else if (key.equals("budgetMilliNodeHours")) { + actualNumberValueEntry = entry; + } + } + + Value actualBoolValue = (Value) actualBoolValueEntry.getValue(); + assertEquals(testObjectInputs.getMultiLabel(), actualBoolValue.getBoolValue()); + + Value actualStringValue = (Value) actualStringValueEntry.getValue(); + assertEquals("CLOUD", actualStringValue.getStringValue()); + + Value actualNumberValue = (Value) actualNumberValueEntry.getValue(); + // protobuf stores int64 values as strings rather than numbers + long actualNumber = Long.parseLong(actualNumberValue.getStringValue()); + assertEquals(testObjectInputs.getBudgetMilliNodeHours(), actualNumber); + } + + @Test + public void testValueConverterFromValue() throws InvalidProtocolBufferException { + + JsonObject testJsonInputs = new JsonObject(); + testJsonInputs.addProperty("multi_label", true); + testJsonInputs.addProperty("model_type", "CLOUD"); + testJsonInputs.addProperty("budget_milli_node_hours", 8000); + + Value.Builder valueBuilder = Value.newBuilder(); + JsonFormat.parser().merge(testJsonInputs.toString(), valueBuilder); + Value testValueInputs = valueBuilder.build(); + + AutoMlImageClassificationInputs actualInputs = + (AutoMlImageClassificationInputs) + ValueConverter.fromValue(AutoMlImageClassificationInputs.newBuilder(), testValueInputs); + + assertEquals(8000, actualInputs.getBudgetMilliNodeHours()); + assertEquals(true, actualInputs.getMultiLabel()); + assertEquals(ModelType.CLOUD, actualInputs.getModelType()); + } + + @Test + public void testValueConverterFromValueWithBadInputs() throws InvalidProtocolBufferException { + JsonObject testBadJsonInputs = new JsonObject(); + testBadJsonInputs.addProperty("wrong_key", "some_value"); + + Value.Builder badValueBuilder = Value.newBuilder(); + JsonFormat.parser().merge(testBadJsonInputs.toString(), badValueBuilder); + final Value testBadValueInputs = badValueBuilder.build(); + + assertThrows( + InvalidProtocolBufferException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + AutoMlImageClassificationInputs actualBadInput = + (AutoMlImageClassificationInputs) + ValueConverter.fromValue( + AutoMlImageClassificationInputs.newBuilder(), testBadValueInputs); + } + }); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClientTest.java index dabbe15e0..3d923f8af 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DatasetServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse; @@ -33,14 +34,17 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; -import io.grpc.Status; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -48,54 +52,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class DatasetServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private DatasetServiceClient client; + private static MockDatasetService mockDatasetService; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockDatasetService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); DatasetServiceSettings settings = DatasetServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -110,18 +91,17 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") public void createDatasetTest() throws Exception { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String metadataSchemaUri = "metadataSchemaUri-152319778"; - String etag = "etag3123477"; Dataset expectedResponse = Dataset.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setMetadataSchemaUri(metadataSchemaUri) - .setEtag(etag) + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -139,9 +119,9 @@ public void createDatasetTest() throws Exception { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDatasetRequest actualRequest = (CreateDatasetRequest) actualRequests.get(0); + CreateDatasetRequest actualRequest = ((CreateDatasetRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(dataset, actualRequest.getDataset()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -150,37 +130,90 @@ public void createDatasetTest() throws Exception { } @Test - @SuppressWarnings("all") public void createDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Dataset dataset = Dataset.newBuilder().build(); + client.createDatasetAsync(parent, dataset).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 + public void createDatasetTest2() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDatasetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Dataset dataset = Dataset.newBuilder().build(); + + Dataset actualResponse = client.createDatasetAsync(parent, dataset).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDatasetRequest actualRequest = ((CreateDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDatasetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String parent = "parent-995424086"; + Dataset dataset = Dataset.newBuilder().build(); client.createDatasetAsync(parent, dataset).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void getDatasetTest() { - DatasetName name2 = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String metadataSchemaUri = "metadataSchemaUri-152319778"; - String etag = "etag3123477"; + public void getDatasetTest() throws Exception { Dataset expectedResponse = Dataset.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setMetadataSchemaUri(metadataSchemaUri) - .setEtag(etag) + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) .build(); mockDatasetService.addResponse(expectedResponse); @@ -191,9 +224,9 @@ public void getDatasetTest() { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDatasetRequest actualRequest = (GetDatasetRequest) actualRequests.get(0); + GetDatasetRequest actualRequest = ((GetDatasetRequest) actualRequests.get(0)); - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -201,34 +234,76 @@ public void getDatasetTest() { } @Test - @SuppressWarnings("all") public void getDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDatasetTest2() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + mockDatasetService.addResponse(expectedResponse); + + String name = "name3373707"; + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDatasetRequest actualRequest = ((GetDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDatasetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String name = "name3373707"; client.getDataset(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateDatasetTest() { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String metadataSchemaUri = "metadataSchemaUri-152319778"; - String etag = "etag3123477"; + public void updateDatasetTest() throws Exception { Dataset expectedResponse = Dataset.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setMetadataSchemaUri(metadataSchemaUri) - .setEtag(etag) + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) .build(); mockDatasetService.addResponse(expectedResponse); @@ -240,7 +315,7 @@ public void updateDatasetTest() { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateDatasetRequest actualRequest = (UpdateDatasetRequest) actualRequests.get(0); + UpdateDatasetRequest actualRequest = ((UpdateDatasetRequest) actualRequests.get(0)); Assert.assertEquals(dataset, actualRequest.getDataset()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -251,32 +326,27 @@ public void updateDatasetTest() { } @Test - @SuppressWarnings("all") public void updateDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.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 + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listDatasetsTest() { - String nextPageToken = ""; - Dataset datasetsElement = Dataset.newBuilder().build(); - List datasets = Arrays.asList(datasetsElement); + public void listDatasetsTest() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); ListDatasetsResponse expectedResponse = ListDatasetsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllDatasets(datasets) + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) .build(); mockDatasetService.addResponse(expectedResponse); @@ -285,14 +355,15 @@ public void listDatasetsTest() { 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 = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDatasetsRequest actualRequest = (ListDatasetsRequest) actualRequests.get(0); + ListDatasetsRequest actualRequest = ((ListDatasetsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -300,23 +371,64 @@ public void listDatasetsTest() { } @Test - @SuppressWarnings("all") public void listDatasetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatasetsTest2() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + 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 = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = ((ListDatasetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatasetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String parent = "parent-995424086"; client.listDatasets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteDatasetTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -329,14 +441,13 @@ public void deleteDatasetTest() throws Exception { DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - Empty actualResponse = client.deleteDatasetAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDatasetAsync(name).get(); List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDatasetRequest actualRequest = (DeleteDatasetRequest) actualRequests.get(0); + DeleteDatasetRequest actualRequest = ((DeleteDatasetRequest) actualRequests.get(0)); - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -344,25 +455,64 @@ public void deleteDatasetTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.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 + public void deleteDatasetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDatasetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDatasetAsync(name).get(); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDatasetRequest actualRequest = ((DeleteDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDatasetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String name = "name3373707"; client.deleteDatasetAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void importDataTest() throws Exception { ImportDataResponse expectedResponse = ImportDataResponse.newBuilder().build(); Operation resultOperation = @@ -381,9 +531,9 @@ public void importDataTest() throws Exception { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ImportDataRequest actualRequest = (ImportDataRequest) actualRequests.get(0); + ImportDataRequest actualRequest = ((ImportDataRequest) actualRequests.get(0)); - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertEquals(importConfigs, actualRequest.getImportConfigsList()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -392,28 +542,72 @@ public void importDataTest() throws Exception { } @Test - @SuppressWarnings("all") public void importDataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); List importConfigs = new ArrayList<>(); + client.importDataAsync(name, importConfigs).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 + public void importDataTest2() throws Exception { + ImportDataResponse expectedResponse = ImportDataResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + String name = "name3373707"; + List importConfigs = new ArrayList<>(); + + ImportDataResponse actualResponse = client.importDataAsync(name, importConfigs).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportDataRequest actualRequest = ((ImportDataRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(importConfigs, actualRequest.getImportConfigsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importDataExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String name = "name3373707"; + List importConfigs = new ArrayList<>(); client.importDataAsync(name, importConfigs).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void exportDataTest() throws Exception { - ExportDataResponse expectedResponse = ExportDataResponse.newBuilder().build(); + ExportDataResponse expectedResponse = + ExportDataResponse.newBuilder().addAllExportedFiles(new ArrayList()).build(); Operation resultOperation = Operation.newBuilder() .setName("exportDataTest") @@ -430,9 +624,9 @@ public void exportDataTest() throws Exception { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ExportDataRequest actualRequest = (ExportDataRequest) actualRequests.get(0); + ExportDataRequest actualRequest = ((ExportDataRequest) actualRequests.get(0)); - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertEquals(exportConfig, actualRequest.getExportConfig()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -441,34 +635,76 @@ public void exportDataTest() throws Exception { } @Test - @SuppressWarnings("all") public void exportDataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build(); + client.exportDataAsync(name, exportConfig).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 + public void exportDataTest2() throws Exception { + ExportDataResponse expectedResponse = + ExportDataResponse.newBuilder().addAllExportedFiles(new ArrayList()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + String name = "name3373707"; + ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build(); + + ExportDataResponse actualResponse = client.exportDataAsync(name, exportConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDataRequest actualRequest = ((ExportDataRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(exportConfig, actualRequest.getExportConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportDataExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String name = "name3373707"; + ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build(); client.exportDataAsync(name, exportConfig).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void listDataItemsTest() { - String nextPageToken = ""; - DataItem dataItemsElement = DataItem.newBuilder().build(); - List dataItems = Arrays.asList(dataItemsElement); + public void listDataItemsTest() throws Exception { + DataItem responsesElement = DataItem.newBuilder().build(); ListDataItemsResponse expectedResponse = ListDataItemsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllDataItems(dataItems) + .setNextPageToken("") + .addAllDataItems(Arrays.asList(responsesElement)) .build(); mockDatasetService.addResponse(expectedResponse); @@ -477,14 +713,15 @@ public void listDataItemsTest() { ListDataItemsPagedResponse pagedListResponse = client.listDataItems(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getDataItemsList().get(0), resources.get(0)); List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDataItemsRequest actualRequest = (ListDataItemsRequest) actualRequests.get(0); + ListDataItemsRequest actualRequest = ((ListDataItemsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, DatasetName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -492,33 +729,74 @@ public void listDataItemsTest() { } @Test - @SuppressWarnings("all") public void listDataItemsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + client.listDataItems(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void listDataItemsTest2() throws Exception { + DataItem responsesElement = DataItem.newBuilder().build(); + ListDataItemsResponse expectedResponse = + ListDataItemsResponse.newBuilder() + .setNextPageToken("") + .addAllDataItems(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataItemsPagedResponse pagedListResponse = client.listDataItems(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataItemsList().get(0), resources.get(0)); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataItemsRequest actualRequest = ((ListDataItemsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataItemsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String parent = "parent-995424086"; client.listDataItems(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getAnnotationSpecTest() { - AnnotationSpecName name2 = - AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); - String displayName = "displayName1615086568"; - String etag = "etag3123477"; + public void getAnnotationSpecTest() throws Exception { AnnotationSpec expectedResponse = AnnotationSpec.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setEtag(etag) + .setName( + AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") + .toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .build(); mockDatasetService.addResponse(expectedResponse); @@ -530,9 +808,9 @@ public void getAnnotationSpecTest() { List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAnnotationSpecRequest actualRequest = (GetAnnotationSpecRequest) actualRequests.get(0); + GetAnnotationSpecRequest actualRequest = ((GetAnnotationSpecRequest) actualRequests.get(0)); - Assert.assertEquals(name, AnnotationSpecName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -540,32 +818,71 @@ public void getAnnotationSpecTest() { } @Test - @SuppressWarnings("all") public void getAnnotationSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); + client.getAnnotationSpec(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnnotationSpecTest2() throws Exception { + AnnotationSpec expectedResponse = + AnnotationSpec.newBuilder() + .setName( + AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") + .toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockDatasetService.addResponse(expectedResponse); + + String name = "name3373707"; + + AnnotationSpec actualResponse = client.getAnnotationSpec(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnnotationSpecRequest actualRequest = ((GetAnnotationSpecRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getAnnotationSpecExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String name = "name3373707"; client.getAnnotationSpec(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listAnnotationsTest() { - String nextPageToken = ""; - Annotation annotationsElement = Annotation.newBuilder().build(); - List annotations = Arrays.asList(annotationsElement); + public void listAnnotationsTest() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); ListAnnotationsResponse expectedResponse = ListAnnotationsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllAnnotations(annotations) + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) .build(); mockDatasetService.addResponse(expectedResponse); @@ -574,14 +891,15 @@ public void listAnnotationsTest() { ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); List actualRequests = mockDatasetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAnnotationsRequest actualRequest = (ListAnnotationsRequest) actualRequests.get(0); + ListAnnotationsRequest actualRequest = ((ListAnnotationsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, DataItemName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -589,18 +907,60 @@ public void listAnnotationsTest() { } @Test - @SuppressWarnings("all") public void listAnnotationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDatasetService.addException(exception); try { DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]"); + client.listAnnotations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnnotationsTest2() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnnotationsRequest actualRequest = ((ListAnnotationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnnotationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatasetService.addException(exception); + + try { + String parent = "parent-995424086"; client.listAnnotations(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java index 64b7a9485..1e6103e42 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.EndpointServiceClient.ListEndpointsPagedResponse; @@ -31,15 +32,17 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; -import io.grpc.Status; +import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -47,54 +50,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class EndpointServiceClientTest { - private static MockDatasetService mockDatasetService; + private static MockServiceHelper mockServiceHelper; private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; private EndpointServiceClient client; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockEndpointService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); EndpointServiceSettings settings = EndpointServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -109,18 +89,18 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") public void createEndpointTest() throws Exception { - EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - String etag = "etag3123477"; Endpoint expectedResponse = Endpoint.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setEtag(etag) + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDeployedModels(new ArrayList()) + .putAllTrafficSplit(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -138,9 +118,9 @@ public void createEndpointTest() throws Exception { List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateEndpointRequest actualRequest = (CreateEndpointRequest) actualRequests.get(0); + CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(endpoint, actualRequest.getEndpoint()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -149,37 +129,92 @@ public void createEndpointTest() throws Exception { } @Test - @SuppressWarnings("all") public void createEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Endpoint endpoint = Endpoint.newBuilder().build(); + client.createEndpointAsync(parent, endpoint).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 + public void createEndpointTest2() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDeployedModels(new ArrayList()) + .putAllTrafficSplit(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + String parent = "parent-995424086"; + Endpoint endpoint = Endpoint.newBuilder().build(); + + Endpoint actualResponse = client.createEndpointAsync(parent, endpoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String parent = "parent-995424086"; + Endpoint endpoint = Endpoint.newBuilder().build(); client.createEndpointAsync(parent, endpoint).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void getEndpointTest() { - EndpointName name2 = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - String etag = "etag3123477"; + public void getEndpointTest() throws Exception { Endpoint expectedResponse = Endpoint.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setEtag(etag) + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDeployedModels(new ArrayList()) + .putAllTrafficSplit(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockEndpointService.addResponse(expectedResponse); @@ -190,9 +225,9 @@ public void getEndpointTest() { List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetEndpointRequest actualRequest = (GetEndpointRequest) actualRequests.get(0); + GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); - Assert.assertEquals(name, EndpointName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -200,31 +235,72 @@ public void getEndpointTest() { } @Test - @SuppressWarnings("all") public void getEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + client.getEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEndpointTest2() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDeployedModels(new ArrayList()) + .putAllTrafficSplit(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockEndpointService.addResponse(expectedResponse); + + String name = "name3373707"; + + Endpoint actualResponse = client.getEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String name = "name3373707"; client.getEndpoint(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listEndpointsTest() { - String nextPageToken = ""; - Endpoint endpointsElement = Endpoint.newBuilder().build(); - List endpoints = Arrays.asList(endpointsElement); + public void listEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); ListEndpointsResponse expectedResponse = ListEndpointsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllEndpoints(endpoints) + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) .build(); mockEndpointService.addResponse(expectedResponse); @@ -233,14 +309,15 @@ public void listEndpointsTest() { ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListEndpointsRequest actualRequest = (ListEndpointsRequest) actualRequests.get(0); + ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -248,34 +325,76 @@ public void listEndpointsTest() { } @Test - @SuppressWarnings("all") public void listEndpointsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEndpointsTest2() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockEndpointService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEndpointsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String parent = "parent-995424086"; client.listEndpoints(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateEndpointTest() { - EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - String etag = "etag3123477"; + public void updateEndpointTest() throws Exception { Endpoint expectedResponse = Endpoint.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setEtag(etag) + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDeployedModels(new ArrayList()) + .putAllTrafficSplit(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockEndpointService.addResponse(expectedResponse); @@ -287,7 +406,7 @@ public void updateEndpointTest() { List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateEndpointRequest actualRequest = (UpdateEndpointRequest) actualRequests.get(0); + UpdateEndpointRequest actualRequest = ((UpdateEndpointRequest) actualRequests.get(0)); Assert.assertEquals(endpoint, actualRequest.getEndpoint()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -298,24 +417,21 @@ public void updateEndpointTest() { } @Test - @SuppressWarnings("all") public void updateEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { Endpoint endpoint = Endpoint.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEndpoint(endpoint, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteEndpointTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -328,14 +444,13 @@ public void deleteEndpointTest() throws Exception { EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - Empty actualResponse = client.deleteEndpointAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteEndpointAsync(name).get(); List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteEndpointRequest actualRequest = (DeleteEndpointRequest) actualRequests.get(0); + DeleteEndpointRequest actualRequest = ((DeleteEndpointRequest) actualRequests.get(0)); - Assert.assertEquals(name, EndpointName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -343,27 +458,69 @@ public void deleteEndpointTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + client.deleteEndpointAsync(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 + public void deleteEndpointTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteEndpointAsync(name).get(); + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEndpointRequest actualRequest = ((DeleteEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String name = "name3373707"; client.deleteEndpointAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void deployModelTest() throws Exception { - DeployModelResponse expectedResponse = DeployModelResponse.newBuilder().build(); + DeployModelResponse expectedResponse = + DeployModelResponse.newBuilder() + .setDeployedModel(DeployedModel.newBuilder().build()) + .build(); Operation resultOperation = Operation.newBuilder() .setName("deployModelTest") @@ -382,9 +539,9 @@ public void deployModelTest() throws Exception { List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeployModelRequest actualRequest = (DeployModelRequest) actualRequests.get(0); + DeployModelRequest actualRequest = ((DeployModelRequest) actualRequests.get(0)); - Assert.assertEquals(endpoint, EndpointName.parse(actualRequest.getEndpoint())); + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); Assert.assertTrue( @@ -394,27 +551,77 @@ public void deployModelTest() throws Exception { } @Test - @SuppressWarnings("all") public void deployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); DeployedModel deployedModel = DeployedModel.newBuilder().build(); Map trafficSplit = new HashMap<>(); + client.deployModelAsync(endpoint, deployedModel, trafficSplit).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 + public void deployModelTest2() throws Exception { + DeployModelResponse expectedResponse = + DeployModelResponse.newBuilder() + .setDeployedModel(DeployedModel.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + String endpoint = "endpoint1741102485"; + DeployedModel deployedModel = DeployedModel.newBuilder().build(); + Map trafficSplit = new HashMap<>(); + + DeployModelResponse actualResponse = + client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeployModelRequest actualRequest = ((DeployModelRequest) actualRequests.get(0)); + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); + Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + DeployedModel deployedModel = DeployedModel.newBuilder().build(); + Map trafficSplit = new HashMap<>(); client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void undeployModelTest() throws Exception { UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); Operation resultOperation = @@ -426,7 +633,7 @@ public void undeployModelTest() throws Exception { mockEndpointService.addResponse(resultOperation); EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId866642506"; + String deployedModelId = "deployedModelId-1817547906"; Map trafficSplit = new HashMap<>(); UndeployModelResponse actualResponse = @@ -435,9 +642,9 @@ public void undeployModelTest() throws Exception { List actualRequests = mockEndpointService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UndeployModelRequest actualRequest = (UndeployModelRequest) actualRequests.get(0); + UndeployModelRequest actualRequest = ((UndeployModelRequest) actualRequests.get(0)); - Assert.assertEquals(endpoint, EndpointName.parse(actualRequest.getEndpoint())); + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); Assert.assertTrue( @@ -447,21 +654,69 @@ public void undeployModelTest() throws Exception { } @Test - @SuppressWarnings("all") public void undeployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockEndpointService.addException(exception); try { EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId866642506"; + String deployedModelId = "deployedModelId-1817547906"; Map trafficSplit = new HashMap<>(); + client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).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 + public void undeployModelTest2() throws Exception { + UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + String endpoint = "endpoint1741102485"; + String deployedModelId = "deployedModelId-1817547906"; + Map trafficSplit = new HashMap<>(); + + UndeployModelResponse actualResponse = + client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeployModelRequest actualRequest = ((UndeployModelRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); + Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeployModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + String deployedModelId = "deployedModelId-1817547906"; + Map trafficSplit = new HashMap<>(); client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java index e6523803c..20514e017 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListBatchPredictionJobsPagedResponse; @@ -33,13 +34,19 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.Empty; -import io.grpc.Status; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import com.google.rpc.Status; +import com.google.type.Money; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -47,54 +54,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class JobServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private JobServiceClient client; + private static MockJobService mockJobService; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockJobService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); JobServiceSettings settings = JobServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -109,12 +93,19 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void createCustomJobTest() { - CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - String displayName = "displayName1615086568"; + public void createCustomJobTest() throws Exception { CustomJob expectedResponse = - CustomJob.newBuilder().setName(name.toString()).setDisplayName(displayName).build(); + CustomJob.newBuilder() + .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setJobSpec(CustomJobSpec.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); mockJobService.addResponse(expectedResponse); LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); @@ -125,9 +116,9 @@ public void createCustomJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateCustomJobRequest actualRequest = (CreateCustomJobRequest) actualRequests.get(0); + CreateCustomJobRequest actualRequest = ((CreateCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(customJob, actualRequest.getCustomJob()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -136,29 +127,83 @@ public void createCustomJobTest() { } @Test - @SuppressWarnings("all") public void createCustomJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); CustomJob customJob = CustomJob.newBuilder().build(); + client.createCustomJob(parent, customJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomJobTest2() throws Exception { + CustomJob expectedResponse = + CustomJob.newBuilder() + .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setJobSpec(CustomJobSpec.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + CustomJob customJob = CustomJob.newBuilder().build(); + + CustomJob actualResponse = client.createCustomJob(parent, customJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomJobRequest actualRequest = ((CreateCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customJob, actualRequest.getCustomJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String parent = "parent-995424086"; + CustomJob customJob = CustomJob.newBuilder().build(); client.createCustomJob(parent, customJob); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getCustomJobTest() { - CustomJobName name2 = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - String displayName = "displayName1615086568"; + public void getCustomJobTest() throws Exception { CustomJob expectedResponse = - CustomJob.newBuilder().setName(name2.toString()).setDisplayName(displayName).build(); + CustomJob.newBuilder() + .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setJobSpec(CustomJobSpec.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); mockJobService.addResponse(expectedResponse); CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); @@ -168,9 +213,9 @@ public void getCustomJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetCustomJobRequest actualRequest = (GetCustomJobRequest) actualRequests.get(0); + GetCustomJobRequest actualRequest = ((GetCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, CustomJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -178,31 +223,72 @@ public void getCustomJobTest() { } @Test - @SuppressWarnings("all") public void getCustomJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + client.getCustomJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomJobTest2() throws Exception { + CustomJob expectedResponse = + CustomJob.newBuilder() + .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setJobSpec(CustomJobSpec.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + CustomJob actualResponse = client.getCustomJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomJobRequest actualRequest = ((GetCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String name = "name3373707"; client.getCustomJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listCustomJobsTest() { - String nextPageToken = ""; - CustomJob customJobsElement = CustomJob.newBuilder().build(); - List customJobs = Arrays.asList(customJobsElement); + public void listCustomJobsTest() throws Exception { + CustomJob responsesElement = CustomJob.newBuilder().build(); ListCustomJobsResponse expectedResponse = ListCustomJobsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllCustomJobs(customJobs) + .setNextPageToken("") + .addAllCustomJobs(Arrays.asList(responsesElement)) .build(); mockJobService.addResponse(expectedResponse); @@ -211,14 +297,15 @@ public void listCustomJobsTest() { ListCustomJobsPagedResponse pagedListResponse = client.listCustomJobs(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getCustomJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListCustomJobsRequest actualRequest = (ListCustomJobsRequest) actualRequests.get(0); + ListCustomJobsRequest actualRequest = ((ListCustomJobsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -226,23 +313,64 @@ public void listCustomJobsTest() { } @Test - @SuppressWarnings("all") public void listCustomJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCustomJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomJobsTest2() throws Exception { + CustomJob responsesElement = CustomJob.newBuilder().build(); + ListCustomJobsResponse expectedResponse = + ListCustomJobsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCustomJobsPagedResponse pagedListResponse = client.listCustomJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomJobsRequest actualRequest = ((ListCustomJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; client.listCustomJobs(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteCustomJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -255,14 +383,13 @@ public void deleteCustomJobTest() throws Exception { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - Empty actualResponse = client.deleteCustomJobAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteCustomJobAsync(name).get(); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteCustomJobRequest actualRequest = (DeleteCustomJobRequest) actualRequests.get(0); + DeleteCustomJobRequest actualRequest = ((DeleteCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, CustomJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -270,38 +397,41 @@ public void deleteCustomJobTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteCustomJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - client.deleteCustomJobAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void cancelCustomJobTest() { + public void deleteCustomJobTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); - mockJobService.addResponse(expectedResponse); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); - CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + String name = "name3373707"; - client.cancelCustomJob(name); + client.deleteCustomJobAsync(name).get(); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CancelCustomJobRequest actualRequest = (CancelCustomJobRequest) actualRequests.get(0); + DeleteCustomJobRequest actualRequest = ((DeleteCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, CustomJobName.parse(actualRequest.getName())); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -309,55 +439,35 @@ public void cancelCustomJobTest() { } @Test - @SuppressWarnings("all") - public void cancelCustomJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void deleteCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - - client.cancelCustomJob(name); + String name = "name3373707"; + client.deleteCustomJobAsync(name).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void createDataLabelingJobTest() { - DataLabelingJobName name = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - String displayName = "displayName1615086568"; - int labelerCount = 1457777167; - String instructionUri = "instructionUri1537272379"; - String inputsSchemaUri = "inputsSchemaUri990382564"; - int labelingProgress = 685978914; - DataLabelingJob expectedResponse = - DataLabelingJob.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setLabelerCount(labelerCount) - .setInstructionUri(instructionUri) - .setInputsSchemaUri(inputsSchemaUri) - .setLabelingProgress(labelingProgress) - .build(); + public void cancelCustomJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockJobService.addResponse(expectedResponse); - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); - DataLabelingJob actualResponse = client.createDataLabelingJob(parent, dataLabelingJob); - Assert.assertEquals(expectedResponse, actualResponse); + client.cancelCustomJob(name); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDataLabelingJobRequest actualRequest = - (CreateDataLabelingJobRequest) actualRequests.get(0); + CancelCustomJobRequest actualRequest = ((CancelCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertEquals(dataLabelingJob, actualRequest.getDataLabelingJob()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -365,54 +475,33 @@ public void createDataLabelingJobTest() { } @Test - @SuppressWarnings("all") - public void createDataLabelingJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void cancelCustomJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); - - client.createDataLabelingJob(parent, dataLabelingJob); + CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + client.cancelCustomJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getDataLabelingJobTest() { - DataLabelingJobName name2 = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - String displayName = "displayName1615086568"; - int labelerCount = 1457777167; - String instructionUri = "instructionUri1537272379"; - String inputsSchemaUri = "inputsSchemaUri990382564"; - int labelingProgress = 685978914; - DataLabelingJob expectedResponse = - DataLabelingJob.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setLabelerCount(labelerCount) - .setInstructionUri(instructionUri) - .setInputsSchemaUri(inputsSchemaUri) - .setLabelingProgress(labelingProgress) - .build(); + public void cancelCustomJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockJobService.addResponse(expectedResponse); - DataLabelingJobName name = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + String name = "name3373707"; - DataLabelingJob actualResponse = client.getDataLabelingJob(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.cancelCustomJob(name); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataLabelingJobRequest actualRequest = (GetDataLabelingJobRequest) actualRequests.get(0); + CancelCustomJobRequest actualRequest = ((CancelCustomJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, DataLabelingJobName.parse(actualRequest.getName())); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -420,48 +509,56 @@ public void getDataLabelingJobTest() { } @Test - @SuppressWarnings("all") - public void getDataLabelingJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void cancelCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - DataLabelingJobName name = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - - client.getDataLabelingJob(name); + String name = "name3373707"; + client.cancelCustomJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listDataLabelingJobsTest() { - String nextPageToken = ""; - DataLabelingJob dataLabelingJobsElement = DataLabelingJob.newBuilder().build(); - List dataLabelingJobs = Arrays.asList(dataLabelingJobsElement); - ListDataLabelingJobsResponse expectedResponse = - ListDataLabelingJobsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllDataLabelingJobs(dataLabelingJobs) + public void createDataLabelingJobTest() throws Exception { + DataLabelingJob expectedResponse = + DataLabelingJob.newBuilder() + .setName( + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString()) + .setDisplayName("displayName1714148973") + .addAllDatasets(new ArrayList()) + .putAllAnnotationLabels(new HashMap()) + .setLabelerCount(-1457777167) + .setInstructionUri("instructionUri1989242366") + .setInputsSchemaUri("inputsSchemaUri1757461538") + .setInputs(Value.newBuilder().build()) + .setLabelingProgress(-685978914) + .setCurrentSpend(Money.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSpecialistPools(new ArrayList()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) .build(); mockJobService.addResponse(expectedResponse); LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); - ListDataLabelingJobsPagedResponse pagedListResponse = client.listDataLabelingJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataLabelingJobsList().get(0), resources.get(0)); + DataLabelingJob actualResponse = client.createDataLabelingJob(parent, dataLabelingJob); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDataLabelingJobsRequest actualRequest = (ListDataLabelingJobsRequest) actualRequests.get(0); + CreateDataLabelingJobRequest actualRequest = + ((CreateDataLabelingJobRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataLabelingJob, actualRequest.getDataLabelingJob()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -469,45 +566,57 @@ public void listDataLabelingJobsTest() { } @Test - @SuppressWarnings("all") - public void listDataLabelingJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void createDataLabelingJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.listDataLabelingJobs(parent); + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + client.createDataLabelingJob(parent, dataLabelingJob); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteDataLabelingJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteDataLabelingJobTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) + public void createDataLabelingJobTest2() throws Exception { + DataLabelingJob expectedResponse = + DataLabelingJob.newBuilder() + .setName( + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString()) + .setDisplayName("displayName1714148973") + .addAllDatasets(new ArrayList()) + .putAllAnnotationLabels(new HashMap()) + .setLabelerCount(-1457777167) + .setInstructionUri("instructionUri1989242366") + .setInputsSchemaUri("inputsSchemaUri1757461538") + .setInputs(Value.newBuilder().build()) + .setLabelingProgress(-685978914) + .setCurrentSpend(Money.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSpecialistPools(new ArrayList()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) .build(); - mockJobService.addResponse(resultOperation); + mockJobService.addResponse(expectedResponse); - DataLabelingJobName name = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + String parent = "parent-995424086"; + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); - Empty actualResponse = client.deleteDataLabelingJobAsync(name).get(); + DataLabelingJob actualResponse = client.createDataLabelingJob(parent, dataLabelingJob); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDataLabelingJobRequest actualRequest = - (DeleteDataLabelingJobRequest) actualRequests.get(0); + CreateDataLabelingJobRequest actualRequest = + ((CreateDataLabelingJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, DataLabelingJobName.parse(actualRequest.getName())); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataLabelingJob, actualRequest.getDataLabelingJob()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -515,41 +624,55 @@ public void deleteDataLabelingJobTest() throws Exception { } @Test - @SuppressWarnings("all") - public void deleteDataLabelingJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void createDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - DataLabelingJobName name = - DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - - client.deleteDataLabelingJobAsync(name).get(); + String parent = "parent-995424086"; + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + client.createDataLabelingJob(parent, dataLabelingJob); Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } catch (InvalidArgumentException e) { + // Expected exception. } } @Test - @SuppressWarnings("all") - public void cancelDataLabelingJobTest() { - Empty expectedResponse = Empty.newBuilder().build(); + public void getDataLabelingJobTest() throws Exception { + DataLabelingJob expectedResponse = + DataLabelingJob.newBuilder() + .setName( + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString()) + .setDisplayName("displayName1714148973") + .addAllDatasets(new ArrayList()) + .putAllAnnotationLabels(new HashMap()) + .setLabelerCount(-1457777167) + .setInstructionUri("instructionUri1989242366") + .setInputsSchemaUri("inputsSchemaUri1757461538") + .setInputs(Value.newBuilder().build()) + .setLabelingProgress(-685978914) + .setCurrentSpend(Money.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSpecialistPools(new ArrayList()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) + .build(); mockJobService.addResponse(expectedResponse); DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - client.cancelDataLabelingJob(name); + DataLabelingJob actualResponse = client.getDataLabelingJob(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CancelDataLabelingJobRequest actualRequest = - (CancelDataLabelingJobRequest) actualRequests.get(0); + GetDataLabelingJobRequest actualRequest = ((GetDataLabelingJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, DataLabelingJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -557,55 +680,54 @@ public void cancelDataLabelingJobTest() { } @Test - @SuppressWarnings("all") - public void cancelDataLabelingJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void getDataLabelingJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); - - client.cancelDataLabelingJob(name); + client.getDataLabelingJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createHyperparameterTuningJobTest() { - HyperparameterTuningJobName name = - HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); - String displayName = "displayName1615086568"; - int maxTrialCount = 445994933; - int parallelTrialCount = 1813795950; - int maxFailedTrialCount = 887662497; - HyperparameterTuningJob expectedResponse = - HyperparameterTuningJob.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setMaxTrialCount(maxTrialCount) - .setParallelTrialCount(parallelTrialCount) - .setMaxFailedTrialCount(maxFailedTrialCount) + public void getDataLabelingJobTest2() throws Exception { + DataLabelingJob expectedResponse = + DataLabelingJob.newBuilder() + .setName( + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString()) + .setDisplayName("displayName1714148973") + .addAllDatasets(new ArrayList()) + .putAllAnnotationLabels(new HashMap()) + .setLabelerCount(-1457777167) + .setInstructionUri("instructionUri1989242366") + .setInputsSchemaUri("inputsSchemaUri1757461538") + .setInputs(Value.newBuilder().build()) + .setLabelingProgress(-685978914) + .setCurrentSpend(Money.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSpecialistPools(new ArrayList()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) .build(); mockJobService.addResponse(expectedResponse); - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build(); + String name = "name3373707"; - HyperparameterTuningJob actualResponse = - client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + DataLabelingJob actualResponse = client.getDataLabelingJob(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateHyperparameterTuningJobRequest actualRequest = - (CreateHyperparameterTuningJobRequest) actualRequests.get(0); + GetDataLabelingJobRequest actualRequest = ((GetDataLabelingJobRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertEquals(hyperparameterTuningJob, actualRequest.getHyperparameterTuningJob()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -613,54 +735,44 @@ public void createHyperparameterTuningJobTest() { } @Test - @SuppressWarnings("all") - public void createHyperparameterTuningJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void getDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - HyperparameterTuningJob hyperparameterTuningJob = - HyperparameterTuningJob.newBuilder().build(); - - client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + String name = "name3373707"; + client.getDataLabelingJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getHyperparameterTuningJobTest() { - HyperparameterTuningJobName name2 = - HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); - String displayName = "displayName1615086568"; - int maxTrialCount = 445994933; - int parallelTrialCount = 1813795950; - int maxFailedTrialCount = 887662497; - HyperparameterTuningJob expectedResponse = - HyperparameterTuningJob.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setMaxTrialCount(maxTrialCount) - .setParallelTrialCount(parallelTrialCount) - .setMaxFailedTrialCount(maxFailedTrialCount) + public void listDataLabelingJobsTest() throws Exception { + DataLabelingJob responsesElement = DataLabelingJob.newBuilder().build(); + ListDataLabelingJobsResponse expectedResponse = + ListDataLabelingJobsResponse.newBuilder() + .setNextPageToken("") + .addAllDataLabelingJobs(Arrays.asList(responsesElement)) .build(); mockJobService.addResponse(expectedResponse); - HyperparameterTuningJobName name = - HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - HyperparameterTuningJob actualResponse = client.getHyperparameterTuningJob(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListDataLabelingJobsPagedResponse pagedListResponse = client.listDataLabelingJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataLabelingJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetHyperparameterTuningJobRequest actualRequest = - (GetHyperparameterTuningJobRequest) actualRequests.get(0); + ListDataLabelingJobsRequest actualRequest = + ((ListDataLabelingJobsRequest) actualRequests.get(0)); - Assert.assertEquals(name, HyperparameterTuningJobName.parse(actualRequest.getName())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -668,34 +780,463 @@ public void getHyperparameterTuningJobTest() { } @Test - @SuppressWarnings("all") - public void getHyperparameterTuningJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void listDataLabelingJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataLabelingJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataLabelingJobsTest2() throws Exception { + DataLabelingJob responsesElement = DataLabelingJob.newBuilder().build(); + ListDataLabelingJobsResponse expectedResponse = + ListDataLabelingJobsResponse.newBuilder() + .setNextPageToken("") + .addAllDataLabelingJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataLabelingJobsPagedResponse pagedListResponse = client.listDataLabelingJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataLabelingJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataLabelingJobsRequest actualRequest = + ((ListDataLabelingJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataLabelingJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataLabelingJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataLabelingJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataLabelingJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + DataLabelingJobName name = + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + + client.deleteDataLabelingJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataLabelingJobRequest actualRequest = + ((DeleteDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataLabelingJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + DataLabelingJobName name = + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + client.deleteDataLabelingJobAsync(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 + public void deleteDataLabelingJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataLabelingJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDataLabelingJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataLabelingJobRequest actualRequest = + ((DeleteDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataLabelingJobAsync(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 + public void cancelDataLabelingJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + DataLabelingJobName name = + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + + client.cancelDataLabelingJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelDataLabelingJobRequest actualRequest = + ((CancelDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelDataLabelingJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + DataLabelingJobName name = + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + client.cancelDataLabelingJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelDataLabelingJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelDataLabelingJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelDataLabelingJobRequest actualRequest = + ((CancelDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.cancelDataLabelingJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHyperparameterTuningJobTest() throws Exception { + HyperparameterTuningJob expectedResponse = + HyperparameterTuningJob.newBuilder() + .setName( + HyperparameterTuningJobName.of( + "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setStudySpec(StudySpec.newBuilder().build()) + .setMaxTrialCount(-445994933) + .setParallelTrialCount(1813795950) + .setMaxFailedTrialCount(-887662497) + .setTrialJobSpec(CustomJobSpec.newBuilder().build()) + .addAllTrials(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build(); + + HyperparameterTuningJob actualResponse = + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHyperparameterTuningJobRequest actualRequest = + ((CreateHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(hyperparameterTuningJob, actualRequest.getHyperparameterTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHyperparameterTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + HyperparameterTuningJob hyperparameterTuningJob = + HyperparameterTuningJob.newBuilder().build(); + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHyperparameterTuningJobTest2() throws Exception { + HyperparameterTuningJob expectedResponse = + HyperparameterTuningJob.newBuilder() + .setName( + HyperparameterTuningJobName.of( + "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setStudySpec(StudySpec.newBuilder().build()) + .setMaxTrialCount(-445994933) + .setParallelTrialCount(1813795950) + .setMaxFailedTrialCount(-887662497) + .setTrialJobSpec(CustomJobSpec.newBuilder().build()) + .addAllTrials(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build(); + + HyperparameterTuningJob actualResponse = + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHyperparameterTuningJobRequest actualRequest = + ((CreateHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(hyperparameterTuningJob, actualRequest.getHyperparameterTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHyperparameterTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + HyperparameterTuningJob hyperparameterTuningJob = + HyperparameterTuningJob.newBuilder().build(); + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHyperparameterTuningJobTest() throws Exception { + HyperparameterTuningJob expectedResponse = + HyperparameterTuningJob.newBuilder() + .setName( + HyperparameterTuningJobName.of( + "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setStudySpec(StudySpec.newBuilder().build()) + .setMaxTrialCount(-445994933) + .setParallelTrialCount(1813795950) + .setMaxFailedTrialCount(-887662497) + .setTrialJobSpec(CustomJobSpec.newBuilder().build()) + .addAllTrials(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + HyperparameterTuningJobName name = + HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + + HyperparameterTuningJob actualResponse = client.getHyperparameterTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHyperparameterTuningJobRequest actualRequest = + ((GetHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHyperparameterTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + client.getHyperparameterTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHyperparameterTuningJobTest2() throws Exception { + HyperparameterTuningJob expectedResponse = + HyperparameterTuningJob.newBuilder() + .setName( + HyperparameterTuningJobName.of( + "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setStudySpec(StudySpec.newBuilder().build()) + .setMaxTrialCount(-445994933) + .setParallelTrialCount(1813795950) + .setMaxFailedTrialCount(-887662497) + .setTrialJobSpec(CustomJobSpec.newBuilder().build()) + .addAllTrials(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + HyperparameterTuningJob actualResponse = client.getHyperparameterTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHyperparameterTuningJobRequest actualRequest = + ((GetHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHyperparameterTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String name = "name3373707"; client.getHyperparameterTuningJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listHyperparameterTuningJobsTest() { - String nextPageToken = ""; - HyperparameterTuningJob hyperparameterTuningJobsElement = - HyperparameterTuningJob.newBuilder().build(); - List hyperparameterTuningJobs = - Arrays.asList(hyperparameterTuningJobsElement); + public void listHyperparameterTuningJobsTest() throws Exception { + HyperparameterTuningJob responsesElement = HyperparameterTuningJob.newBuilder().build(); ListHyperparameterTuningJobsResponse expectedResponse = ListHyperparameterTuningJobsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllHyperparameterTuningJobs(hyperparameterTuningJobs) + .setNextPageToken("") + .addAllHyperparameterTuningJobs(Arrays.asList(responsesElement)) .build(); mockJobService.addResponse(expectedResponse); @@ -705,6 +1246,7 @@ public void listHyperparameterTuningJobsTest() { client.listHyperparameterTuningJobs(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals( expectedResponse.getHyperparameterTuningJobsList().get(0), resources.get(0)); @@ -712,9 +1254,9 @@ public void listHyperparameterTuningJobsTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListHyperparameterTuningJobsRequest actualRequest = - (ListHyperparameterTuningJobsRequest) actualRequests.get(0); + ((ListHyperparameterTuningJobsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -722,23 +1264,67 @@ public void listHyperparameterTuningJobsTest() { } @Test - @SuppressWarnings("all") public void listHyperparameterTuningJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listHyperparameterTuningJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHyperparameterTuningJobsTest2() throws Exception { + HyperparameterTuningJob responsesElement = HyperparameterTuningJob.newBuilder().build(); + ListHyperparameterTuningJobsResponse expectedResponse = + ListHyperparameterTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllHyperparameterTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListHyperparameterTuningJobsPagedResponse pagedListResponse = + client.listHyperparameterTuningJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getHyperparameterTuningJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHyperparameterTuningJobsRequest actualRequest = + ((ListHyperparameterTuningJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHyperparameterTuningJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String parent = "parent-995424086"; client.listHyperparameterTuningJobs(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteHyperparameterTuningJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -752,15 +1338,14 @@ public void deleteHyperparameterTuningJobTest() throws Exception { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); - Empty actualResponse = client.deleteHyperparameterTuningJobAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteHyperparameterTuningJobAsync(name).get(); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteHyperparameterTuningJobRequest actualRequest = - (DeleteHyperparameterTuningJobRequest) actualRequests.get(0); + ((DeleteHyperparameterTuningJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, HyperparameterTuningJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -768,27 +1353,67 @@ public void deleteHyperparameterTuningJobTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteHyperparameterTuningJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + client.deleteHyperparameterTuningJobAsync(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 + public void deleteHyperparameterTuningJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHyperparameterTuningJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteHyperparameterTuningJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHyperparameterTuningJobRequest actualRequest = + ((DeleteHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void deleteHyperparameterTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; client.deleteHyperparameterTuningJobAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void cancelHyperparameterTuningJobTest() { + public void cancelHyperparameterTuningJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockJobService.addResponse(expectedResponse); @@ -800,9 +1425,9 @@ public void cancelHyperparameterTuningJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CancelHyperparameterTuningJobRequest actualRequest = - (CancelHyperparameterTuningJobRequest) actualRequests.get(0); + ((CancelHyperparameterTuningJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, HyperparameterTuningJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -810,36 +1435,78 @@ public void cancelHyperparameterTuningJobTest() { } @Test - @SuppressWarnings("all") public void cancelHyperparameterTuningJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + client.cancelHyperparameterTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelHyperparameterTuningJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelHyperparameterTuningJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelHyperparameterTuningJobRequest actualRequest = + ((CancelHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelHyperparameterTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String name = "name3373707"; client.cancelHyperparameterTuningJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createBatchPredictionJobTest() { - BatchPredictionJobName name = - BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); - String displayName = "displayName1615086568"; - ModelName model = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - boolean generateExplanation = false; + public void createBatchPredictionJobTest() throws Exception { BatchPredictionJob expectedResponse = BatchPredictionJob.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setModel(model.toString()) - .setGenerateExplanation(generateExplanation) + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelParameters(Value.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setGenerateExplanation(true) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setError(Status.newBuilder().build()) + .addAllPartialFailures(new ArrayList()) + .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) + .setCompletionStats(CompletionStats.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockJobService.addResponse(expectedResponse); @@ -852,9 +1519,9 @@ public void createBatchPredictionJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CreateBatchPredictionJobRequest actualRequest = - (CreateBatchPredictionJobRequest) actualRequests.get(0); + ((CreateBatchPredictionJobRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(batchPredictionJob, actualRequest.getBatchPredictionJob()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -863,36 +1530,103 @@ public void createBatchPredictionJobTest() { } @Test - @SuppressWarnings("all") public void createBatchPredictionJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build(); + client.createBatchPredictionJob(parent, batchPredictionJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBatchPredictionJobTest2() throws Exception { + BatchPredictionJob expectedResponse = + BatchPredictionJob.newBuilder() + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelParameters(Value.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setGenerateExplanation(true) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setError(Status.newBuilder().build()) + .addAllPartialFailures(new ArrayList()) + .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) + .setCompletionStats(CompletionStats.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build(); + + BatchPredictionJob actualResponse = client.createBatchPredictionJob(parent, batchPredictionJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBatchPredictionJobRequest actualRequest = + ((CreateBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(batchPredictionJob, actualRequest.getBatchPredictionJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBatchPredictionJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String parent = "parent-995424086"; + BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build(); client.createBatchPredictionJob(parent, batchPredictionJob); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getBatchPredictionJobTest() { - BatchPredictionJobName name2 = - BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); - String displayName = "displayName1615086568"; - ModelName model = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - boolean generateExplanation = false; + public void getBatchPredictionJobTest() throws Exception { BatchPredictionJob expectedResponse = BatchPredictionJob.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setModel(model.toString()) - .setGenerateExplanation(generateExplanation) + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelParameters(Value.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setGenerateExplanation(true) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setError(Status.newBuilder().build()) + .addAllPartialFailures(new ArrayList()) + .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) + .setCompletionStats(CompletionStats.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockJobService.addResponse(expectedResponse); @@ -905,9 +1639,9 @@ public void getBatchPredictionJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetBatchPredictionJobRequest actualRequest = - (GetBatchPredictionJobRequest) actualRequests.get(0); + ((GetBatchPredictionJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, BatchPredictionJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -915,32 +1649,84 @@ public void getBatchPredictionJobTest() { } @Test - @SuppressWarnings("all") public void getBatchPredictionJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + client.getBatchPredictionJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBatchPredictionJobTest2() throws Exception { + BatchPredictionJob expectedResponse = + BatchPredictionJob.newBuilder() + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelParameters(Value.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setGenerateExplanation(true) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setError(Status.newBuilder().build()) + .addAllPartialFailures(new ArrayList()) + .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) + .setCompletionStats(CompletionStats.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + BatchPredictionJob actualResponse = client.getBatchPredictionJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBatchPredictionJobRequest actualRequest = + ((GetBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBatchPredictionJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String name = "name3373707"; client.getBatchPredictionJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listBatchPredictionJobsTest() { - String nextPageToken = ""; - BatchPredictionJob batchPredictionJobsElement = BatchPredictionJob.newBuilder().build(); - List batchPredictionJobs = Arrays.asList(batchPredictionJobsElement); + public void listBatchPredictionJobsTest() throws Exception { + BatchPredictionJob responsesElement = BatchPredictionJob.newBuilder().build(); ListBatchPredictionJobsResponse expectedResponse = ListBatchPredictionJobsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllBatchPredictionJobs(batchPredictionJobs) + .setNextPageToken("") + .addAllBatchPredictionJobs(Arrays.asList(responsesElement)) .build(); mockJobService.addResponse(expectedResponse); @@ -949,15 +1735,16 @@ public void listBatchPredictionJobsTest() { ListBatchPredictionJobsPagedResponse pagedListResponse = client.listBatchPredictionJobs(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getBatchPredictionJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListBatchPredictionJobsRequest actualRequest = - (ListBatchPredictionJobsRequest) actualRequests.get(0); + ((ListBatchPredictionJobsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -965,23 +1752,65 @@ public void listBatchPredictionJobsTest() { } @Test - @SuppressWarnings("all") public void listBatchPredictionJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBatchPredictionJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBatchPredictionJobsTest2() throws Exception { + BatchPredictionJob responsesElement = BatchPredictionJob.newBuilder().build(); + ListBatchPredictionJobsResponse expectedResponse = + ListBatchPredictionJobsResponse.newBuilder() + .setNextPageToken("") + .addAllBatchPredictionJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBatchPredictionJobsPagedResponse pagedListResponse = client.listBatchPredictionJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBatchPredictionJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBatchPredictionJobsRequest actualRequest = + ((ListBatchPredictionJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void listBatchPredictionJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; client.listBatchPredictionJobs(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteBatchPredictionJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -995,15 +1824,14 @@ public void deleteBatchPredictionJobTest() throws Exception { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); - Empty actualResponse = client.deleteBatchPredictionJobAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteBatchPredictionJobAsync(name).get(); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteBatchPredictionJobRequest actualRequest = - (DeleteBatchPredictionJobRequest) actualRequests.get(0); + ((DeleteBatchPredictionJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, BatchPredictionJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1011,27 +1839,67 @@ public void deleteBatchPredictionJobTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteBatchPredictionJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + client.deleteBatchPredictionJobAsync(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 + public void deleteBatchPredictionJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBatchPredictionJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBatchPredictionJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBatchPredictionJobRequest actualRequest = + ((DeleteBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBatchPredictionJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + try { + String name = "name3373707"; client.deleteBatchPredictionJobAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void cancelBatchPredictionJobTest() { + public void cancelBatchPredictionJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockJobService.addResponse(expectedResponse); @@ -1043,9 +1911,9 @@ public void cancelBatchPredictionJobTest() { List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CancelBatchPredictionJobRequest actualRequest = - (CancelBatchPredictionJobRequest) actualRequests.get(0); + ((CancelBatchPredictionJobRequest) actualRequests.get(0)); - Assert.assertEquals(name, BatchPredictionJobName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1053,19 +1921,52 @@ public void cancelBatchPredictionJobTest() { } @Test - @SuppressWarnings("all") public void cancelBatchPredictionJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + client.cancelBatchPredictionJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelBatchPredictionJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + client.cancelBatchPredictionJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelBatchPredictionJobRequest actualRequest = + ((CancelBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelBatchPredictionJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; client.cancelBatchPredictionJob(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClientTest.java index d86df28d8..c05840d38 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; @@ -29,7 +30,6 @@ import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; -import io.grpc.Status; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -37,6 +37,7 @@ import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -44,54 +45,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class MigrationServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private MigrationServiceClient client; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockMigrationService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); MigrationServiceSettings settings = MigrationServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -106,15 +84,12 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void searchMigratableResourcesTest() { - String nextPageToken = ""; - MigratableResource migratableResourcesElement = MigratableResource.newBuilder().build(); - List migratableResources = Arrays.asList(migratableResourcesElement); + public void searchMigratableResourcesTest() throws Exception { + MigratableResource responsesElement = MigratableResource.newBuilder().build(); SearchMigratableResourcesResponse expectedResponse = SearchMigratableResourcesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllMigratableResources(migratableResources) + .setNextPageToken("") + .addAllMigratableResources(Arrays.asList(responsesElement)) .build(); mockMigrationService.addResponse(expectedResponse); @@ -124,15 +99,16 @@ public void searchMigratableResourcesTest() { client.searchMigratableResources(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getMigratableResourcesList().get(0), resources.get(0)); List actualRequests = mockMigrationService.getRequests(); Assert.assertEquals(1, actualRequests.size()); SearchMigratableResourcesRequest actualRequest = - (SearchMigratableResourcesRequest) actualRequests.get(0); + ((SearchMigratableResourcesRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -140,26 +116,71 @@ public void searchMigratableResourcesTest() { } @Test - @SuppressWarnings("all") public void searchMigratableResourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMigrationService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.searchMigratableResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchMigratableResourcesTest2() throws Exception { + MigratableResource responsesElement = MigratableResource.newBuilder().build(); + SearchMigratableResourcesResponse expectedResponse = + SearchMigratableResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMigratableResources(Arrays.asList(responsesElement)) + .build(); + mockMigrationService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + SearchMigratableResourcesPagedResponse pagedListResponse = + client.searchMigratableResources(parent); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMigratableResourcesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchMigratableResourcesRequest actualRequest = + ((SearchMigratableResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchMigratableResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; client.searchMigratableResources(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void batchMigrateResourcesTest() throws Exception { BatchMigrateResourcesResponse expectedResponse = - BatchMigrateResourcesResponse.newBuilder().build(); + BatchMigrateResourcesResponse.newBuilder() + .addAllMigrateResourceResponses(new ArrayList()) + .build(); Operation resultOperation = Operation.newBuilder() .setName("batchMigrateResourcesTest") @@ -178,9 +199,9 @@ public void batchMigrateResourcesTest() throws Exception { List actualRequests = mockMigrationService.getRequests(); Assert.assertEquals(1, actualRequests.size()); BatchMigrateResourcesRequest actualRequest = - (BatchMigrateResourcesRequest) actualRequests.get(0); + ((BatchMigrateResourcesRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(migrateResourceRequests, actualRequest.getMigrateResourceRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -189,20 +210,69 @@ public void batchMigrateResourcesTest() throws Exception { } @Test - @SuppressWarnings("all") public void batchMigrateResourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockMigrationService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List migrateResourceRequests = new ArrayList<>(); + client.batchMigrateResourcesAsync(parent, migrateResourceRequests).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 + public void batchMigrateResourcesTest2() throws Exception { + BatchMigrateResourcesResponse expectedResponse = + BatchMigrateResourcesResponse.newBuilder() + .addAllMigrateResourceResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchMigrateResourcesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationService.addResponse(resultOperation); + + String parent = "parent-995424086"; + List migrateResourceRequests = new ArrayList<>(); + + BatchMigrateResourcesResponse actualResponse = + client.batchMigrateResourcesAsync(parent, migrateResourceRequests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchMigrateResourcesRequest actualRequest = + ((BatchMigrateResourcesRequest) actualRequests.get(0)); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(migrateResourceRequests, actualRequest.getMigrateResourceRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchMigrateResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; + List migrateResourceRequests = new ArrayList<>(); client.batchMigrateResourcesAsync(parent, migrateResourceRequests).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetService.java index 8ea4e864e..61f4d0191 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockDatasetService implements MockGrpcService { private final MockDatasetServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetServiceImpl.java index 6481e0e0f..9aca8171f 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDatasetServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockDatasetServiceImpl extends DatasetServiceImplBase { private List requests; private Queue responses; @@ -63,10 +65,10 @@ public void createDataset( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -77,10 +79,10 @@ public void getDataset(GetDatasetRequest request, StreamObserver respon Object response = responses.remove(); if (response instanceof Dataset) { requests.add(request); - responseObserver.onNext((Dataset) response); + responseObserver.onNext(((Dataset) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -92,10 +94,10 @@ public void updateDataset( Object response = responses.remove(); if (response instanceof Dataset) { requests.add(request); - responseObserver.onNext((Dataset) response); + responseObserver.onNext(((Dataset) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -107,10 +109,10 @@ public void listDatasets( Object response = responses.remove(); if (response instanceof ListDatasetsResponse) { requests.add(request); - responseObserver.onNext((ListDatasetsResponse) response); + responseObserver.onNext(((ListDatasetsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -122,10 +124,10 @@ public void deleteDataset( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -136,10 +138,10 @@ public void importData(ImportDataRequest request, StreamObserver resp Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -150,10 +152,10 @@ public void exportData(ExportDataRequest request, StreamObserver resp Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -165,10 +167,10 @@ public void listDataItems( Object response = responses.remove(); if (response instanceof ListDataItemsResponse) { requests.add(request); - responseObserver.onNext((ListDataItemsResponse) response); + responseObserver.onNext(((ListDataItemsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -180,10 +182,10 @@ public void getAnnotationSpec( Object response = responses.remove(); if (response instanceof AnnotationSpec) { requests.add(request); - responseObserver.onNext((AnnotationSpec) response); + responseObserver.onNext(((AnnotationSpec) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -195,10 +197,10 @@ public void listAnnotations( Object response = responses.remove(); if (response instanceof ListAnnotationsResponse) { requests.add(request); - responseObserver.onNext((ListAnnotationsResponse) response); + responseObserver.onNext(((ListAnnotationsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointService.java index c5f8b9759..1540f6fe5 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockEndpointService implements MockGrpcService { private final MockEndpointServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointServiceImpl.java index 405137f09..bf0919778 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockEndpointServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockEndpointServiceImpl extends EndpointServiceImplBase { private List requests; private Queue responses; @@ -63,10 +65,10 @@ public void createEndpoint( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -77,10 +79,10 @@ public void getEndpoint(GetEndpointRequest request, StreamObserver res Object response = responses.remove(); if (response instanceof Endpoint) { requests.add(request); - responseObserver.onNext((Endpoint) response); + responseObserver.onNext(((Endpoint) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -92,10 +94,10 @@ public void listEndpoints( Object response = responses.remove(); if (response instanceof ListEndpointsResponse) { requests.add(request); - responseObserver.onNext((ListEndpointsResponse) response); + responseObserver.onNext(((ListEndpointsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -107,10 +109,10 @@ public void updateEndpoint( Object response = responses.remove(); if (response instanceof Endpoint) { requests.add(request); - responseObserver.onNext((Endpoint) response); + responseObserver.onNext(((Endpoint) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -122,10 +124,10 @@ public void deleteEndpoint( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -136,10 +138,10 @@ public void deployModel(DeployModelRequest request, StreamObserver re Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -151,10 +153,10 @@ public void undeployModel( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobService.java index d28b09361..d0e14e3be 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockJobService implements MockGrpcService { private final MockJobServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java index e5dce15c5..6a69236aa 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -25,9 +26,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockJobServiceImpl extends JobServiceImplBase { private List requests; private Queue responses; @@ -64,10 +66,10 @@ public void createCustomJob( Object response = responses.remove(); if (response instanceof CustomJob) { requests.add(request); - responseObserver.onNext((CustomJob) response); + responseObserver.onNext(((CustomJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -79,10 +81,10 @@ public void getCustomJob( Object response = responses.remove(); if (response instanceof CustomJob) { requests.add(request); - responseObserver.onNext((CustomJob) response); + responseObserver.onNext(((CustomJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -94,10 +96,10 @@ public void listCustomJobs( Object response = responses.remove(); if (response instanceof ListCustomJobsResponse) { requests.add(request); - responseObserver.onNext((ListCustomJobsResponse) response); + responseObserver.onNext(((ListCustomJobsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -109,10 +111,10 @@ public void deleteCustomJob( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -124,10 +126,10 @@ public void cancelCustomJob( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -139,10 +141,10 @@ public void createDataLabelingJob( Object response = responses.remove(); if (response instanceof DataLabelingJob) { requests.add(request); - responseObserver.onNext((DataLabelingJob) response); + responseObserver.onNext(((DataLabelingJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -154,10 +156,10 @@ public void getDataLabelingJob( Object response = responses.remove(); if (response instanceof DataLabelingJob) { requests.add(request); - responseObserver.onNext((DataLabelingJob) response); + responseObserver.onNext(((DataLabelingJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -170,10 +172,10 @@ public void listDataLabelingJobs( Object response = responses.remove(); if (response instanceof ListDataLabelingJobsResponse) { requests.add(request); - responseObserver.onNext((ListDataLabelingJobsResponse) response); + responseObserver.onNext(((ListDataLabelingJobsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -185,10 +187,10 @@ public void deleteDataLabelingJob( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -200,10 +202,10 @@ public void cancelDataLabelingJob( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -216,10 +218,10 @@ public void createHyperparameterTuningJob( Object response = responses.remove(); if (response instanceof HyperparameterTuningJob) { requests.add(request); - responseObserver.onNext((HyperparameterTuningJob) response); + responseObserver.onNext(((HyperparameterTuningJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -232,10 +234,10 @@ public void getHyperparameterTuningJob( Object response = responses.remove(); if (response instanceof HyperparameterTuningJob) { requests.add(request); - responseObserver.onNext((HyperparameterTuningJob) response); + responseObserver.onNext(((HyperparameterTuningJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -248,10 +250,10 @@ public void listHyperparameterTuningJobs( Object response = responses.remove(); if (response instanceof ListHyperparameterTuningJobsResponse) { requests.add(request); - responseObserver.onNext((ListHyperparameterTuningJobsResponse) response); + responseObserver.onNext(((ListHyperparameterTuningJobsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -263,10 +265,10 @@ public void deleteHyperparameterTuningJob( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -278,10 +280,10 @@ public void cancelHyperparameterTuningJob( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -294,10 +296,10 @@ public void createBatchPredictionJob( Object response = responses.remove(); if (response instanceof BatchPredictionJob) { requests.add(request); - responseObserver.onNext((BatchPredictionJob) response); + responseObserver.onNext(((BatchPredictionJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -309,10 +311,10 @@ public void getBatchPredictionJob( Object response = responses.remove(); if (response instanceof BatchPredictionJob) { requests.add(request); - responseObserver.onNext((BatchPredictionJob) response); + responseObserver.onNext(((BatchPredictionJob) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -325,10 +327,10 @@ public void listBatchPredictionJobs( Object response = responses.remove(); if (response instanceof ListBatchPredictionJobsResponse) { requests.add(request); - responseObserver.onNext((ListBatchPredictionJobsResponse) response); + responseObserver.onNext(((ListBatchPredictionJobsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -340,10 +342,10 @@ public void deleteBatchPredictionJob( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -355,10 +357,10 @@ public void cancelBatchPredictionJob( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationService.java index 61212624d..e5b205815 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockMigrationService implements MockGrpcService { private final MockMigrationServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationServiceImpl.java index dfb64782c..025a3b30d 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockMigrationServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockMigrationServiceImpl extends MigrationServiceImplBase { private List requests; private Queue responses; @@ -64,10 +66,10 @@ public void searchMigratableResources( Object response = responses.remove(); if (response instanceof SearchMigratableResourcesResponse) { requests.add(request); - responseObserver.onNext((SearchMigratableResourcesResponse) response); + responseObserver.onNext(((SearchMigratableResourcesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -79,10 +81,10 @@ public void batchMigrateResources( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelService.java index e3794da35..c928386be 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockModelService implements MockGrpcService { private final MockModelServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java index 0f5cc1fc9..1a178e4bb 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockModelServiceImpl extends ModelServiceImplBase { private List requests; private Queue responses; @@ -62,10 +64,10 @@ public void uploadModel(UploadModelRequest request, StreamObserver re Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -76,10 +78,10 @@ public void getModel(GetModelRequest request, StreamObserver responseObse Object response = responses.remove(); if (response instanceof Model) { requests.add(request); - responseObserver.onNext((Model) response); + responseObserver.onNext(((Model) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -91,10 +93,10 @@ public void listModels( Object response = responses.remove(); if (response instanceof ListModelsResponse) { requests.add(request); - responseObserver.onNext((ListModelsResponse) response); + responseObserver.onNext(((ListModelsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -105,10 +107,10 @@ public void updateModel(UpdateModelRequest request, StreamObserver respon Object response = responses.remove(); if (response instanceof Model) { requests.add(request); - responseObserver.onNext((Model) response); + responseObserver.onNext(((Model) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -119,10 +121,10 @@ public void deleteModel(DeleteModelRequest request, StreamObserver re Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -133,10 +135,10 @@ public void exportModel(ExportModelRequest request, StreamObserver re Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -148,10 +150,10 @@ public void getModelEvaluation( Object response = responses.remove(); if (response instanceof ModelEvaluation) { requests.add(request); - responseObserver.onNext((ModelEvaluation) response); + responseObserver.onNext(((ModelEvaluation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -164,10 +166,10 @@ public void listModelEvaluations( Object response = responses.remove(); if (response instanceof ListModelEvaluationsResponse) { requests.add(request); - responseObserver.onNext((ListModelEvaluationsResponse) response); + responseObserver.onNext(((ListModelEvaluationsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -180,10 +182,10 @@ public void getModelEvaluationSlice( Object response = responses.remove(); if (response instanceof ModelEvaluationSlice) { requests.add(request); - responseObserver.onNext((ModelEvaluationSlice) response); + responseObserver.onNext(((ModelEvaluationSlice) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -196,10 +198,10 @@ public void listModelEvaluationSlices( Object response = responses.remove(); if (response instanceof ListModelEvaluationSlicesResponse) { requests.add(request); - responseObserver.onNext((ListModelEvaluationSlicesResponse) response); + responseObserver.onNext(((ListModelEvaluationSlicesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineService.java index 531a37482..df13b37ba 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockPipelineService implements MockGrpcService { private final MockPipelineServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java index afd7bc0bd..8d124695f 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -25,9 +26,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockPipelineServiceImpl extends PipelineServiceImplBase { private List requests; private Queue responses; @@ -64,10 +66,10 @@ public void createTrainingPipeline( Object response = responses.remove(); if (response instanceof TrainingPipeline) { requests.add(request); - responseObserver.onNext((TrainingPipeline) response); + responseObserver.onNext(((TrainingPipeline) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -79,10 +81,10 @@ public void getTrainingPipeline( Object response = responses.remove(); if (response instanceof TrainingPipeline) { requests.add(request); - responseObserver.onNext((TrainingPipeline) response); + responseObserver.onNext(((TrainingPipeline) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -95,10 +97,10 @@ public void listTrainingPipelines( Object response = responses.remove(); if (response instanceof ListTrainingPipelinesResponse) { requests.add(request); - responseObserver.onNext((ListTrainingPipelinesResponse) response); + responseObserver.onNext(((ListTrainingPipelinesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -110,10 +112,10 @@ public void deleteTrainingPipeline( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -125,10 +127,10 @@ public void cancelTrainingPipeline( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionService.java index fb02f50ca..5d846aa72 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockPredictionService implements MockGrpcService { private final MockPredictionServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java index 68dc750d9..41520593e 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -23,9 +24,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockPredictionServiceImpl extends PredictionServiceImplBase { private List requests; private Queue responses; @@ -61,10 +63,10 @@ public void predict(PredictRequest request, StreamObserver resp Object response = responses.remove(); if (response instanceof PredictResponse) { requests.add(request); - responseObserver.onNext((PredictResponse) response); + responseObserver.onNext(((PredictResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -75,10 +77,10 @@ public void explain(ExplainRequest request, StreamObserver resp Object response = responses.remove(); if (response instanceof ExplainResponse) { requests.add(request); - responseObserver.onNext((ExplainResponse) response); + responseObserver.onNext(((ExplainResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolService.java index 57ff4e59b..9587c9a41 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolService.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockSpecialistPoolService implements MockGrpcService { private final MockSpecialistPoolServiceImpl serviceImpl; diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolServiceImpl.java index dadcd1dcc..f65ef9c29 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolServiceImpl.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockSpecialistPoolServiceImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.core.BetaApi; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockSpecialistPoolServiceImpl extends SpecialistPoolServiceImplBase { private List requests; private Queue responses; @@ -63,10 +65,10 @@ public void createSpecialistPool( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -78,10 +80,10 @@ public void getSpecialistPool( Object response = responses.remove(); if (response instanceof SpecialistPool) { requests.add(request); - responseObserver.onNext((SpecialistPool) response); + responseObserver.onNext(((SpecialistPool) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -94,10 +96,10 @@ public void listSpecialistPools( Object response = responses.remove(); if (response instanceof ListSpecialistPoolsResponse) { requests.add(request); - responseObserver.onNext((ListSpecialistPoolsResponse) response); + responseObserver.onNext(((ListSpecialistPoolsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -109,10 +111,10 @@ public void deleteSpecialistPool( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -124,10 +126,10 @@ public void updateSpecialistPool( Object response = responses.remove(); if (response instanceof Operation) { requests.add(request); - responseObserver.onNext((Operation) response); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java index b098c2f10..ddd33ec23 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; @@ -33,13 +34,17 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; -import io.grpc.Status; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -47,54 +52,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class ModelServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private ModelServiceClient client; + private static MockModelService mockModelService; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockModelService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); ModelServiceSettings settings = ModelServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -109,11 +91,11 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") public void uploadModelTest() throws Exception { - ModelName model2 = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); UploadModelResponse expectedResponse = - UploadModelResponse.newBuilder().setModel(model2.toString()).build(); + UploadModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .build(); Operation resultOperation = Operation.newBuilder() .setName("uploadModelTest") @@ -130,9 +112,9 @@ public void uploadModelTest() throws Exception { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UploadModelRequest actualRequest = (UploadModelRequest) actualRequests.get(0); + UploadModelRequest actualRequest = ((UploadModelRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(model, actualRequest.getModel()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -141,44 +123,96 @@ public void uploadModelTest() throws Exception { } @Test - @SuppressWarnings("all") public void uploadModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Model model = Model.newBuilder().build(); + client.uploadModelAsync(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 + public void uploadModelTest2() throws Exception { + UploadModelResponse expectedResponse = + UploadModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("uploadModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Model model = Model.newBuilder().build(); + + UploadModelResponse actualResponse = client.uploadModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UploadModelRequest actualRequest = ((UploadModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + Model model = Model.newBuilder().build(); client.uploadModelAsync(parent, model).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void getModelTest() { - ModelName name2 = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - String metadataSchemaUri = "metadataSchemaUri-152319778"; - TrainingPipelineName trainingPipeline = - TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); - String artifactUri = "artifactUri-671891073"; - String etag = "etag3123477"; + public void getModelTest() throws Exception { Model expectedResponse = Model.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setMetadataSchemaUri(metadataSchemaUri) - .setTrainingPipeline(trainingPipeline.toString()) - .setArtifactUri(artifactUri) - .setEtag(etag) + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPredictSchemata(PredictSchemata.newBuilder().build()) + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .addAllSupportedExportFormats(new ArrayList()) + .setTrainingPipeline( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setContainerSpec(ModelContainerSpec.newBuilder().build()) + .setArtifactUri("artifactUri-1130062278") + .addAllSupportedDeploymentResourcesTypes(new ArrayList()) + .addAllSupportedInputStorageFormats(new ArrayList()) + .addAllSupportedOutputStorageFormats(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedModels(new ArrayList()) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) .build(); mockModelService.addResponse(expectedResponse); @@ -189,9 +223,9 @@ public void getModelTest() { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetModelRequest actualRequest = (GetModelRequest) actualRequests.get(0); + GetModelRequest actualRequest = ((GetModelRequest) actualRequests.get(0)); - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -199,31 +233,84 @@ public void getModelTest() { } @Test - @SuppressWarnings("all") public void getModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.getModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getModelTest2() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPredictSchemata(PredictSchemata.newBuilder().build()) + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .addAllSupportedExportFormats(new ArrayList()) + .setTrainingPipeline( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setContainerSpec(ModelContainerSpec.newBuilder().build()) + .setArtifactUri("artifactUri-1130062278") + .addAllSupportedDeploymentResourcesTypes(new ArrayList()) + .addAllSupportedInputStorageFormats(new ArrayList()) + .addAllSupportedOutputStorageFormats(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedModels(new ArrayList()) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + Model actualResponse = client.getModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetModelRequest actualRequest = ((GetModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; client.getModel(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listModelsTest() { - String nextPageToken = ""; - Model modelsElement = Model.newBuilder().build(); - List models = Arrays.asList(modelsElement); + public void listModelsTest() throws Exception { + Model responsesElement = Model.newBuilder().build(); ListModelsResponse expectedResponse = ListModelsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllModels(models) + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) .build(); mockModelService.addResponse(expectedResponse); @@ -232,14 +319,15 @@ public void listModelsTest() { ListModelsPagedResponse pagedListResponse = client.listModels(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListModelsRequest actualRequest = (ListModelsRequest) actualRequests.get(0); + ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -247,41 +335,88 @@ public void listModelsTest() { } @Test - @SuppressWarnings("all") public void listModelsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void listModelsTest2() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; client.listModels(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateModelTest() { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - String metadataSchemaUri = "metadataSchemaUri-152319778"; - TrainingPipelineName trainingPipeline = - TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); - String artifactUri = "artifactUri-671891073"; - String etag = "etag3123477"; + public void updateModelTest() throws Exception { Model expectedResponse = Model.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setMetadataSchemaUri(metadataSchemaUri) - .setTrainingPipeline(trainingPipeline.toString()) - .setArtifactUri(artifactUri) - .setEtag(etag) + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPredictSchemata(PredictSchemata.newBuilder().build()) + .setMetadataSchemaUri("metadataSchemaUri781971868") + .setMetadata(Value.newBuilder().build()) + .addAllSupportedExportFormats(new ArrayList()) + .setTrainingPipeline( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setContainerSpec(ModelContainerSpec.newBuilder().build()) + .setArtifactUri("artifactUri-1130062278") + .addAllSupportedDeploymentResourcesTypes(new ArrayList()) + .addAllSupportedInputStorageFormats(new ArrayList()) + .addAllSupportedOutputStorageFormats(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedModels(new ArrayList()) + .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) .build(); mockModelService.addResponse(expectedResponse); @@ -293,7 +428,7 @@ public void updateModelTest() { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateModelRequest actualRequest = (UpdateModelRequest) actualRequests.get(0); + UpdateModelRequest actualRequest = ((UpdateModelRequest) actualRequests.get(0)); Assert.assertEquals(model, actualRequest.getModel()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -304,24 +439,21 @@ public void updateModelTest() { } @Test - @SuppressWarnings("all") public void updateModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.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 + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteModelTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -334,14 +466,13 @@ public void deleteModelTest() throws Exception { ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - Empty actualResponse = client.deleteModelAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteModelAsync(name).get(); List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteModelRequest actualRequest = (DeleteModelRequest) actualRequests.get(0); + DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0)); - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -349,25 +480,64 @@ public void deleteModelTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.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 + public void deleteModelTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteModelAsync(name).get(); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void deleteModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; client.deleteModelAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void exportModelTest() throws Exception { ExportModelResponse expectedResponse = ExportModelResponse.newBuilder().build(); Operation resultOperation = @@ -387,9 +557,9 @@ public void exportModelTest() throws Exception { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ExportModelRequest actualRequest = (ExportModelRequest) actualRequests.get(0); + ExportModelRequest actualRequest = ((ExportModelRequest) actualRequests.get(0)); - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -398,35 +568,83 @@ public void exportModelTest() throws Exception { } @Test - @SuppressWarnings("all") public void exportModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); ExportModelRequest.OutputConfig outputConfig = ExportModelRequest.OutputConfig.newBuilder().build(); + client.exportModelAsync(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 + public void exportModelTest2() throws Exception { + ExportModelResponse expectedResponse = ExportModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String name = "name3373707"; + ExportModelRequest.OutputConfig outputConfig = + ExportModelRequest.OutputConfig.newBuilder().build(); + + ExportModelResponse actualResponse = client.exportModelAsync(name, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportModelRequest actualRequest = ((ExportModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; + ExportModelRequest.OutputConfig outputConfig = + ExportModelRequest.OutputConfig.newBuilder().build(); client.exportModelAsync(name, outputConfig).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void getModelEvaluationTest() { - ModelEvaluationName name2 = - ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); - String metricsSchemaUri = "metricsSchemaUri981925578"; + public void getModelEvaluationTest() throws Exception { ModelEvaluation expectedResponse = ModelEvaluation.newBuilder() - .setName(name2.toString()) - .setMetricsSchemaUri(metricsSchemaUri) + .setName( + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]") + .toString()) + .setMetricsSchemaUri("metricsSchemaUri-182209912") + .setMetrics(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllSliceDimensions(new ArrayList()) + .setModelExplanation(ModelExplanation.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -438,9 +656,9 @@ public void getModelEvaluationTest() { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetModelEvaluationRequest actualRequest = (GetModelEvaluationRequest) actualRequests.get(0); + GetModelEvaluationRequest actualRequest = ((GetModelEvaluationRequest) actualRequests.get(0)); - Assert.assertEquals(name, ModelEvaluationName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -448,32 +666,72 @@ public void getModelEvaluationTest() { } @Test - @SuppressWarnings("all") public void getModelEvaluationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + client.getModelEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getModelEvaluationTest2() throws Exception { + ModelEvaluation expectedResponse = + ModelEvaluation.newBuilder() + .setName( + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]") + .toString()) + .setMetricsSchemaUri("metricsSchemaUri-182209912") + .setMetrics(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllSliceDimensions(new ArrayList()) + .setModelExplanation(ModelExplanation.newBuilder().build()) + .build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + ModelEvaluation actualResponse = client.getModelEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetModelEvaluationRequest actualRequest = ((GetModelEvaluationRequest) actualRequests.get(0)); + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getModelEvaluationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; client.getModelEvaluation(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listModelEvaluationsTest() { - String nextPageToken = ""; - ModelEvaluation modelEvaluationsElement = ModelEvaluation.newBuilder().build(); - List modelEvaluations = Arrays.asList(modelEvaluationsElement); + public void listModelEvaluationsTest() throws Exception { + ModelEvaluation responsesElement = ModelEvaluation.newBuilder().build(); ListModelEvaluationsResponse expectedResponse = ListModelEvaluationsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllModelEvaluations(modelEvaluations) + .setNextPageToken("") + .addAllModelEvaluations(Arrays.asList(responsesElement)) .build(); mockModelService.addResponse(expectedResponse); @@ -482,14 +740,16 @@ public void listModelEvaluationsTest() { ListModelEvaluationsPagedResponse pagedListResponse = client.listModelEvaluations(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getModelEvaluationsList().get(0), resources.get(0)); List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListModelEvaluationsRequest actualRequest = (ListModelEvaluationsRequest) actualRequests.get(0); + ListModelEvaluationsRequest actualRequest = + ((ListModelEvaluationsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, ModelName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -497,32 +757,75 @@ public void listModelEvaluationsTest() { } @Test - @SuppressWarnings("all") public void listModelEvaluationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.listModelEvaluations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelEvaluationsTest2() throws Exception { + ModelEvaluation responsesElement = ModelEvaluation.newBuilder().build(); + ListModelEvaluationsResponse expectedResponse = + ListModelEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllModelEvaluations(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListModelEvaluationsPagedResponse pagedListResponse = client.listModelEvaluations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelEvaluationsList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelEvaluationsRequest actualRequest = + ((ListModelEvaluationsRequest) actualRequests.get(0)); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelEvaluationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; client.listModelEvaluations(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getModelEvaluationSliceTest() { - ModelEvaluationSliceName name2 = - ModelEvaluationSliceName.of( - "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"); - String metricsSchemaUri = "metricsSchemaUri981925578"; + public void getModelEvaluationSliceTest() throws Exception { ModelEvaluationSlice expectedResponse = ModelEvaluationSlice.newBuilder() - .setName(name2.toString()) - .setMetricsSchemaUri(metricsSchemaUri) + .setName( + ModelEvaluationSliceName.of( + "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]") + .toString()) + .setMetricsSchemaUri("metricsSchemaUri-182209912") + .setMetrics(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -536,9 +839,9 @@ public void getModelEvaluationSliceTest() { List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetModelEvaluationSliceRequest actualRequest = - (GetModelEvaluationSliceRequest) actualRequests.get(0); + ((GetModelEvaluationSliceRequest) actualRequests.get(0)); - Assert.assertEquals(name, ModelEvaluationSliceName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -546,33 +849,73 @@ public void getModelEvaluationSliceTest() { } @Test - @SuppressWarnings("all") public void getModelEvaluationSliceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelEvaluationSliceName name = ModelEvaluationSliceName.of( "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"); + client.getModelEvaluationSlice(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getModelEvaluationSliceTest2() throws Exception { + ModelEvaluationSlice expectedResponse = + ModelEvaluationSlice.newBuilder() + .setName( + ModelEvaluationSliceName.of( + "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]") + .toString()) + .setMetricsSchemaUri("metricsSchemaUri-182209912") + .setMetrics(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + ModelEvaluationSlice actualResponse = client.getModelEvaluationSlice(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetModelEvaluationSliceRequest actualRequest = + ((GetModelEvaluationSliceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getModelEvaluationSliceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + try { + String name = "name3373707"; client.getModelEvaluationSlice(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listModelEvaluationSlicesTest() { - String nextPageToken = ""; - ModelEvaluationSlice modelEvaluationSlicesElement = ModelEvaluationSlice.newBuilder().build(); - List modelEvaluationSlices = Arrays.asList(modelEvaluationSlicesElement); + public void listModelEvaluationSlicesTest() throws Exception { + ModelEvaluationSlice responsesElement = ModelEvaluationSlice.newBuilder().build(); ListModelEvaluationSlicesResponse expectedResponse = ListModelEvaluationSlicesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllModelEvaluationSlices(modelEvaluationSlices) + .setNextPageToken("") + .addAllModelEvaluationSlices(Arrays.asList(responsesElement)) .build(); mockModelService.addResponse(expectedResponse); @@ -583,15 +926,16 @@ public void listModelEvaluationSlicesTest() { client.listModelEvaluationSlices(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getModelEvaluationSlicesList().get(0), resources.get(0)); List actualRequests = mockModelService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListModelEvaluationSlicesRequest actualRequest = - (ListModelEvaluationSlicesRequest) actualRequests.get(0); + ((ListModelEvaluationSlicesRequest) actualRequests.get(0)); - Assert.assertEquals(parent, ModelEvaluationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -599,19 +943,63 @@ public void listModelEvaluationSlicesTest() { } @Test - @SuppressWarnings("all") public void listModelEvaluationSlicesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockModelService.addException(exception); try { ModelEvaluationName parent = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + client.listModelEvaluationSlices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelEvaluationSlicesTest2() throws Exception { + ModelEvaluationSlice responsesElement = ModelEvaluationSlice.newBuilder().build(); + ListModelEvaluationSlicesResponse expectedResponse = + ListModelEvaluationSlicesResponse.newBuilder() + .setNextPageToken("") + .addAllModelEvaluationSlices(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListModelEvaluationSlicesPagedResponse pagedListResponse = + client.listModelEvaluationSlices(parent); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelEvaluationSlicesList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelEvaluationSlicesRequest actualRequest = + ((ListModelEvaluationSlicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelEvaluationSlicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; client.listModelEvaluationSlices(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java index fe5d098bb..82c77c18a 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; @@ -30,13 +31,17 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.Empty; -import io.grpc.Status; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import com.google.rpc.Status; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -44,54 +49,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class PipelineServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; + private static MockServiceHelper mockServiceHelper; private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; private PipelineServiceClient client; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockPipelineService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); PipelineServiceSettings settings = PipelineServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -106,17 +88,24 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void createTrainingPipelineTest() { - TrainingPipelineName name = - TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); - String displayName = "displayName1615086568"; - String trainingTaskDefinition = "trainingTaskDefinition-1916695832"; + public void createTrainingPipelineTest() throws Exception { TrainingPipeline expectedResponse = TrainingPipeline.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setTrainingTaskDefinition(trainingTaskDefinition) + .setName( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setDisplayName("displayName1714148973") + .setInputDataConfig(InputDataConfig.newBuilder().build()) + .setTrainingTaskDefinition("trainingTaskDefinition-1218104270") + .setTrainingTaskInputs(Value.newBuilder().build()) + .setTrainingTaskMetadata(Value.newBuilder().build()) + .setModelToUpload(Model.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockPipelineService.addResponse(expectedResponse); @@ -129,9 +118,9 @@ public void createTrainingPipelineTest() { List actualRequests = mockPipelineService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CreateTrainingPipelineRequest actualRequest = - (CreateTrainingPipelineRequest) actualRequests.get(0); + ((CreateTrainingPipelineRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(trainingPipeline, actualRequest.getTrainingPipeline()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -140,34 +129,95 @@ public void createTrainingPipelineTest() { } @Test - @SuppressWarnings("all") public void createTrainingPipelineExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPipelineService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); + client.createTrainingPipeline(parent, trainingPipeline); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTrainingPipelineTest2() throws Exception { + TrainingPipeline expectedResponse = + TrainingPipeline.newBuilder() + .setName( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setDisplayName("displayName1714148973") + .setInputDataConfig(InputDataConfig.newBuilder().build()) + .setTrainingTaskDefinition("trainingTaskDefinition-1218104270") + .setTrainingTaskInputs(Value.newBuilder().build()) + .setTrainingTaskMetadata(Value.newBuilder().build()) + .setModelToUpload(Model.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockPipelineService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); + + TrainingPipeline actualResponse = client.createTrainingPipeline(parent, trainingPipeline); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTrainingPipelineRequest actualRequest = + ((CreateTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(trainingPipeline, actualRequest.getTrainingPipeline()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void createTrainingPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String parent = "parent-995424086"; + TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); client.createTrainingPipeline(parent, trainingPipeline); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getTrainingPipelineTest() { - TrainingPipelineName name2 = - TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); - String displayName = "displayName1615086568"; - String trainingTaskDefinition = "trainingTaskDefinition-1916695832"; + public void getTrainingPipelineTest() throws Exception { TrainingPipeline expectedResponse = TrainingPipeline.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setTrainingTaskDefinition(trainingTaskDefinition) + .setName( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setDisplayName("displayName1714148973") + .setInputDataConfig(InputDataConfig.newBuilder().build()) + .setTrainingTaskDefinition("trainingTaskDefinition-1218104270") + .setTrainingTaskInputs(Value.newBuilder().build()) + .setTrainingTaskMetadata(Value.newBuilder().build()) + .setModelToUpload(Model.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockPipelineService.addResponse(expectedResponse); @@ -179,9 +229,9 @@ public void getTrainingPipelineTest() { List actualRequests = mockPipelineService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetTrainingPipelineRequest actualRequest = (GetTrainingPipelineRequest) actualRequests.get(0); + GetTrainingPipelineRequest actualRequest = ((GetTrainingPipelineRequest) actualRequests.get(0)); - Assert.assertEquals(name, TrainingPipelineName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -189,32 +239,79 @@ public void getTrainingPipelineTest() { } @Test - @SuppressWarnings("all") public void getTrainingPipelineExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPipelineService.addException(exception); try { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + client.getTrainingPipeline(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTrainingPipelineTest2() throws Exception { + TrainingPipeline expectedResponse = + TrainingPipeline.newBuilder() + .setName( + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") + .toString()) + .setDisplayName("displayName1714148973") + .setInputDataConfig(InputDataConfig.newBuilder().build()) + .setTrainingTaskDefinition("trainingTaskDefinition-1218104270") + .setTrainingTaskInputs(Value.newBuilder().build()) + .setTrainingTaskMetadata(Value.newBuilder().build()) + .setModelToUpload(Model.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockPipelineService.addResponse(expectedResponse); + + String name = "name3373707"; + + TrainingPipeline actualResponse = client.getTrainingPipeline(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTrainingPipelineRequest actualRequest = ((GetTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getTrainingPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String name = "name3373707"; client.getTrainingPipeline(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listTrainingPipelinesTest() { - String nextPageToken = ""; - TrainingPipeline trainingPipelinesElement = TrainingPipeline.newBuilder().build(); - List trainingPipelines = Arrays.asList(trainingPipelinesElement); + public void listTrainingPipelinesTest() throws Exception { + TrainingPipeline responsesElement = TrainingPipeline.newBuilder().build(); ListTrainingPipelinesResponse expectedResponse = ListTrainingPipelinesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllTrainingPipelines(trainingPipelines) + .setNextPageToken("") + .addAllTrainingPipelines(Arrays.asList(responsesElement)) .build(); mockPipelineService.addResponse(expectedResponse); @@ -223,15 +320,16 @@ public void listTrainingPipelinesTest() { ListTrainingPipelinesPagedResponse pagedListResponse = client.listTrainingPipelines(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getTrainingPipelinesList().get(0), resources.get(0)); List actualRequests = mockPipelineService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListTrainingPipelinesRequest actualRequest = - (ListTrainingPipelinesRequest) actualRequests.get(0); + ((ListTrainingPipelinesRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -239,23 +337,65 @@ public void listTrainingPipelinesTest() { } @Test - @SuppressWarnings("all") public void listTrainingPipelinesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPipelineService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTrainingPipelines(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTrainingPipelinesTest2() throws Exception { + TrainingPipeline responsesElement = TrainingPipeline.newBuilder().build(); + ListTrainingPipelinesResponse expectedResponse = + ListTrainingPipelinesResponse.newBuilder() + .setNextPageToken("") + .addAllTrainingPipelines(Arrays.asList(responsesElement)) + .build(); + mockPipelineService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTrainingPipelinesPagedResponse pagedListResponse = client.listTrainingPipelines(parent); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTrainingPipelinesList().get(0), resources.get(0)); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTrainingPipelinesRequest actualRequest = + ((ListTrainingPipelinesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTrainingPipelinesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String parent = "parent-995424086"; client.listTrainingPipelines(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteTrainingPipelineTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -269,15 +409,14 @@ public void deleteTrainingPipelineTest() throws Exception { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); - Empty actualResponse = client.deleteTrainingPipelineAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteTrainingPipelineAsync(name).get(); List actualRequests = mockPipelineService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteTrainingPipelineRequest actualRequest = - (DeleteTrainingPipelineRequest) actualRequests.get(0); + ((DeleteTrainingPipelineRequest) actualRequests.get(0)); - Assert.assertEquals(name, TrainingPipelineName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -285,27 +424,67 @@ public void deleteTrainingPipelineTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteTrainingPipelineExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPipelineService.addException(exception); try { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + client.deleteTrainingPipelineAsync(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 + public void deleteTrainingPipelineTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTrainingPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPipelineService.addResponse(resultOperation); + + String name = "name3373707"; + client.deleteTrainingPipelineAsync(name).get(); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTrainingPipelineRequest actualRequest = + ((DeleteTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTrainingPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String name = "name3373707"; client.deleteTrainingPipelineAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void cancelTrainingPipelineTest() { + public void cancelTrainingPipelineTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockPipelineService.addResponse(expectedResponse); @@ -317,9 +496,9 @@ public void cancelTrainingPipelineTest() { List actualRequests = mockPipelineService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CancelTrainingPipelineRequest actualRequest = - (CancelTrainingPipelineRequest) actualRequests.get(0); + ((CancelTrainingPipelineRequest) actualRequests.get(0)); - Assert.assertEquals(name, TrainingPipelineName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -327,19 +506,52 @@ public void cancelTrainingPipelineTest() { } @Test - @SuppressWarnings("all") public void cancelTrainingPipelineExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPipelineService.addException(exception); try { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + client.cancelTrainingPipeline(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void cancelTrainingPipelineTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPipelineService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelTrainingPipeline(name); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTrainingPipelineRequest actualRequest = + ((CancelTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTrainingPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String name = "name3373707"; client.cancelTrainingPipeline(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java index 63d8d0237..fb45fa594 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import com.google.api.gax.core.NoCredentialsProvider; @@ -24,13 +25,13 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Value; -import io.grpc.Status; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -38,54 +39,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class PredictionServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private PredictionServiceClient client; + private static MockPredictionService mockPredictionService; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); mockPredictionService = new MockPredictionService(); - mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + UUID.randomUUID().toString(), Arrays.asList(mockPredictionService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); PredictionServiceSettings settings = PredictionServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -100,11 +78,12 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void predictTest() { - String deployedModelId = "deployedModelId866642506"; + public void predictTest() throws Exception { PredictResponse expectedResponse = - PredictResponse.newBuilder().setDeployedModelId(deployedModelId).build(); + PredictResponse.newBuilder() + .addAllPredictions(new ArrayList()) + .setDeployedModelId("deployedModelId-1817547906") + .build(); mockPredictionService.addResponse(expectedResponse); EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); @@ -116,9 +95,9 @@ public void predictTest() { List actualRequests = mockPredictionService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - PredictRequest actualRequest = (PredictRequest) actualRequests.get(0); + PredictRequest actualRequest = ((PredictRequest) actualRequests.get(0)); - Assert.assertEquals(endpoint, EndpointName.parse(actualRequest.getEndpoint())); + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); Assert.assertEquals(instances, actualRequest.getInstancesList()); Assert.assertEquals(parameters, actualRequest.getParameters()); Assert.assertTrue( @@ -128,35 +107,80 @@ public void predictTest() { } @Test - @SuppressWarnings("all") public void predictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPredictionService.addException(exception); try { EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); List instances = new ArrayList<>(); Value parameters = Value.newBuilder().build(); + client.predict(endpoint, instances, parameters); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void predictTest2() throws Exception { + PredictResponse expectedResponse = + PredictResponse.newBuilder() + .addAllPredictions(new ArrayList()) + .setDeployedModelId("deployedModelId-1817547906") + .build(); + mockPredictionService.addResponse(expectedResponse); + + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + Value parameters = Value.newBuilder().build(); + + PredictResponse actualResponse = client.predict(endpoint, instances, parameters); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPredictionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PredictRequest actualRequest = ((PredictRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertEquals(parameters, actualRequest.getParameters()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void predictExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + Value parameters = Value.newBuilder().build(); client.predict(endpoint, instances, parameters); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void explainTest() { - String deployedModelId2 = "deployedModelId2-380204163"; + public void explainTest() throws Exception { ExplainResponse expectedResponse = - ExplainResponse.newBuilder().setDeployedModelId(deployedModelId2).build(); + ExplainResponse.newBuilder() + .addAllExplanations(new ArrayList()) + .setDeployedModelId("deployedModelId-1817547906") + .addAllPredictions(new ArrayList()) + .build(); mockPredictionService.addResponse(expectedResponse); EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); List instances = new ArrayList<>(); Value parameters = Value.newBuilder().build(); - String deployedModelId = "deployedModelId866642506"; + String deployedModelId = "deployedModelId-1817547906"; ExplainResponse actualResponse = client.explain(endpoint, instances, parameters, deployedModelId); @@ -164,9 +188,9 @@ public void explainTest() { List actualRequests = mockPredictionService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ExplainRequest actualRequest = (ExplainRequest) actualRequests.get(0); + ExplainRequest actualRequest = ((ExplainRequest) actualRequests.get(0)); - Assert.assertEquals(endpoint, EndpointName.parse(actualRequest.getEndpoint())); + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); Assert.assertEquals(instances, actualRequest.getInstancesList()); Assert.assertEquals(parameters, actualRequest.getParameters()); Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); @@ -177,21 +201,69 @@ public void explainTest() { } @Test - @SuppressWarnings("all") public void explainExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockPredictionService.addException(exception); try { EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); List instances = new ArrayList<>(); Value parameters = Value.newBuilder().build(); - String deployedModelId = "deployedModelId866642506"; + String deployedModelId = "deployedModelId-1817547906"; + client.explain(endpoint, instances, parameters, deployedModelId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void explainTest2() throws Exception { + ExplainResponse expectedResponse = + ExplainResponse.newBuilder() + .addAllExplanations(new ArrayList()) + .setDeployedModelId("deployedModelId-1817547906") + .addAllPredictions(new ArrayList()) + .build(); + mockPredictionService.addResponse(expectedResponse); + + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + Value parameters = Value.newBuilder().build(); + String deployedModelId = "deployedModelId-1817547906"; + + ExplainResponse actualResponse = + client.explain(endpoint, instances, parameters, deployedModelId); + Assert.assertEquals(expectedResponse, actualResponse); + List actualRequests = mockPredictionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExplainRequest actualRequest = ((ExplainRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertEquals(parameters, actualRequest.getParameters()); + Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void explainExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + Value parameters = Value.newBuilder().build(); + String deployedModelId = "deployedModelId-1817547906"; client.explain(endpoint, instances, parameters, deployedModelId); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClientTest.java index 1fb6cb634..6fc580494 100644 --- a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClientTest.java +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClientTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.aiplatform.v1beta1; import static com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; @@ -31,13 +32,14 @@ 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.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -45,54 +47,32 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class SpecialistPoolServiceClientTest { - private static MockDatasetService mockDatasetService; - private static MockEndpointService mockEndpointService; - private static MockJobService mockJobService; - private static MockMigrationService mockMigrationService; - private static MockModelService mockModelService; - private static MockPipelineService mockPipelineService; - private static MockPredictionService mockPredictionService; - private static MockSpecialistPoolService mockSpecialistPoolService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private SpecialistPoolServiceClient client; + private static MockSpecialistPoolService mockSpecialistPoolService; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { - mockDatasetService = new MockDatasetService(); - mockEndpointService = new MockEndpointService(); - mockJobService = new MockJobService(); - mockMigrationService = new MockMigrationService(); - mockModelService = new MockModelService(); - mockPipelineService = new MockPipelineService(); - mockPredictionService = new MockPredictionService(); mockSpecialistPoolService = new MockSpecialistPoolService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( UUID.randomUUID().toString(), - Arrays.asList( - mockDatasetService, - mockEndpointService, - mockJobService, - mockMigrationService, - mockModelService, - mockPipelineService, - mockPredictionService, - mockSpecialistPoolService)); - serviceHelper.start(); + Arrays.asList(mockSpecialistPoolService)); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); SpecialistPoolServiceSettings settings = SpecialistPoolServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -107,16 +87,15 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") public void createSpecialistPoolTest() throws Exception { - SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); - String displayName = "displayName1615086568"; - int specialistManagersCount = 984151356; SpecialistPool expectedResponse = SpecialistPool.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setSpecialistManagersCount(specialistManagersCount) + .setName( + SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString()) + .setDisplayName("displayName1714148973") + .setSpecialistManagersCount(-984151356) + .addAllSpecialistManagerEmails(new ArrayList()) + .addAllPendingDataLabelingJobs(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -134,9 +113,10 @@ public void createSpecialistPoolTest() throws Exception { List actualRequests = mockSpecialistPoolService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSpecialistPoolRequest actualRequest = (CreateSpecialistPoolRequest) actualRequests.get(0); + CreateSpecialistPoolRequest actualRequest = + ((CreateSpecialistPoolRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(specialistPool, actualRequest.getSpecialistPool()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -145,36 +125,87 @@ public void createSpecialistPoolTest() throws Exception { } @Test - @SuppressWarnings("all") public void createSpecialistPoolExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockSpecialistPoolService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); SpecialistPool specialistPool = SpecialistPool.newBuilder().build(); + client.createSpecialistPoolAsync(parent, specialistPool).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 + public void createSpecialistPoolTest2() throws Exception { + SpecialistPool expectedResponse = + SpecialistPool.newBuilder() + .setName( + SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString()) + .setDisplayName("displayName1714148973") + .setSpecialistManagersCount(-984151356) + .addAllSpecialistManagerEmails(new ArrayList()) + .addAllPendingDataLabelingJobs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSpecialistPoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSpecialistPoolService.addResponse(resultOperation); + + String parent = "parent-995424086"; + SpecialistPool specialistPool = SpecialistPool.newBuilder().build(); + + SpecialistPool actualResponse = client.createSpecialistPoolAsync(parent, specialistPool).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSpecialistPoolRequest actualRequest = + ((CreateSpecialistPoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(specialistPool, actualRequest.getSpecialistPool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void createSpecialistPoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpecialistPoolService.addException(exception); + + try { + String parent = "parent-995424086"; + SpecialistPool specialistPool = SpecialistPool.newBuilder().build(); client.createSpecialistPoolAsync(parent, specialistPool).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") - public void getSpecialistPoolTest() { - SpecialistPoolName name2 = - SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); - String displayName = "displayName1615086568"; - int specialistManagersCount = 984151356; + public void getSpecialistPoolTest() throws Exception { SpecialistPool expectedResponse = SpecialistPool.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setSpecialistManagersCount(specialistManagersCount) + .setName( + SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString()) + .setDisplayName("displayName1714148973") + .setSpecialistManagersCount(-984151356) + .addAllSpecialistManagerEmails(new ArrayList()) + .addAllPendingDataLabelingJobs(new ArrayList()) .build(); mockSpecialistPoolService.addResponse(expectedResponse); @@ -185,9 +216,9 @@ public void getSpecialistPoolTest() { List actualRequests = mockSpecialistPoolService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSpecialistPoolRequest actualRequest = (GetSpecialistPoolRequest) actualRequests.get(0); + GetSpecialistPoolRequest actualRequest = ((GetSpecialistPoolRequest) actualRequests.get(0)); - Assert.assertEquals(name, SpecialistPoolName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -195,32 +226,70 @@ public void getSpecialistPoolTest() { } @Test - @SuppressWarnings("all") public void getSpecialistPoolExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockSpecialistPoolService.addException(exception); try { SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); + client.getSpecialistPool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSpecialistPoolTest2() throws Exception { + SpecialistPool expectedResponse = + SpecialistPool.newBuilder() + .setName( + SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString()) + .setDisplayName("displayName1714148973") + .setSpecialistManagersCount(-984151356) + .addAllSpecialistManagerEmails(new ArrayList()) + .addAllPendingDataLabelingJobs(new ArrayList()) + .build(); + mockSpecialistPoolService.addResponse(expectedResponse); + + String name = "name3373707"; + + SpecialistPool actualResponse = client.getSpecialistPool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSpecialistPoolRequest actualRequest = ((GetSpecialistPoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSpecialistPoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpecialistPoolService.addException(exception); + try { + String name = "name3373707"; client.getSpecialistPool(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listSpecialistPoolsTest() { - String nextPageToken = ""; - SpecialistPool specialistPoolsElement = SpecialistPool.newBuilder().build(); - List specialistPools = Arrays.asList(specialistPoolsElement); + public void listSpecialistPoolsTest() throws Exception { + SpecialistPool responsesElement = SpecialistPool.newBuilder().build(); ListSpecialistPoolsResponse expectedResponse = ListSpecialistPoolsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllSpecialistPools(specialistPools) + .setNextPageToken("") + .addAllSpecialistPools(Arrays.asList(responsesElement)) .build(); mockSpecialistPoolService.addResponse(expectedResponse); @@ -229,14 +298,15 @@ public void listSpecialistPoolsTest() { ListSpecialistPoolsPagedResponse pagedListResponse = client.listSpecialistPools(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getSpecialistPoolsList().get(0), resources.get(0)); List actualRequests = mockSpecialistPoolService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSpecialistPoolsRequest actualRequest = (ListSpecialistPoolsRequest) actualRequests.get(0); + ListSpecialistPoolsRequest actualRequest = ((ListSpecialistPoolsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -244,23 +314,64 @@ public void listSpecialistPoolsTest() { } @Test - @SuppressWarnings("all") public void listSpecialistPoolsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockSpecialistPoolService.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSpecialistPools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSpecialistPoolsTest2() throws Exception { + SpecialistPool responsesElement = SpecialistPool.newBuilder().build(); + ListSpecialistPoolsResponse expectedResponse = + ListSpecialistPoolsResponse.newBuilder() + .setNextPageToken("") + .addAllSpecialistPools(Arrays.asList(responsesElement)) + .build(); + mockSpecialistPoolService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSpecialistPoolsPagedResponse pagedListResponse = client.listSpecialistPools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpecialistPoolsList().get(0), resources.get(0)); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSpecialistPoolsRequest actualRequest = ((ListSpecialistPoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSpecialistPoolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpecialistPoolService.addException(exception); + + try { + String parent = "parent-995424086"; client.listSpecialistPools(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") public void deleteSpecialistPoolTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = @@ -273,14 +384,14 @@ public void deleteSpecialistPoolTest() throws Exception { SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); - Empty actualResponse = client.deleteSpecialistPoolAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSpecialistPoolAsync(name).get(); List actualRequests = mockSpecialistPoolService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSpecialistPoolRequest actualRequest = (DeleteSpecialistPoolRequest) actualRequests.get(0); + DeleteSpecialistPoolRequest actualRequest = + ((DeleteSpecialistPoolRequest) actualRequests.get(0)); - Assert.assertEquals(name, SpecialistPoolName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -288,35 +399,75 @@ public void deleteSpecialistPoolTest() throws Exception { } @Test - @SuppressWarnings("all") public void deleteSpecialistPoolExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockSpecialistPoolService.addException(exception); try { SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); + client.deleteSpecialistPoolAsync(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 + public void deleteSpecialistPoolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpecialistPoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSpecialistPoolService.addResponse(resultOperation); + String name = "name3373707"; + + client.deleteSpecialistPoolAsync(name).get(); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpecialistPoolRequest actualRequest = + ((DeleteSpecialistPoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpecialistPoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpecialistPoolService.addException(exception); + + try { + String name = "name3373707"; client.deleteSpecialistPoolAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - @SuppressWarnings("all") public void updateSpecialistPoolTest() throws Exception { - SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); - String displayName = "displayName1615086568"; - int specialistManagersCount = 984151356; SpecialistPool expectedResponse = SpecialistPool.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setSpecialistManagersCount(specialistManagersCount) + .setName( + SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString()) + .setDisplayName("displayName1714148973") + .setSpecialistManagersCount(-984151356) + .addAllSpecialistManagerEmails(new ArrayList()) + .addAllPendingDataLabelingJobs(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -335,7 +486,8 @@ public void updateSpecialistPoolTest() throws Exception { List actualRequests = mockSpecialistPoolService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateSpecialistPoolRequest actualRequest = (UpdateSpecialistPoolRequest) actualRequests.get(0); + UpdateSpecialistPoolRequest actualRequest = + ((UpdateSpecialistPoolRequest) actualRequests.get(0)); Assert.assertEquals(specialistPool, actualRequest.getSpecialistPool()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -346,20 +498,18 @@ public void updateSpecialistPoolTest() throws Exception { } @Test - @SuppressWarnings("all") public void updateSpecialistPoolExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockSpecialistPoolService.addException(exception); try { SpecialistPool specialistPool = SpecialistPool.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSpecialistPoolAsync(specialistPool, updateMask).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } diff --git a/grpc-google-cloud-aiplatform-v1beta1/pom.xml b/grpc-google-cloud-aiplatform-v1beta1/pom.xml index a7a579a70..797caade2 100644 --- a/grpc-google-cloud-aiplatform-v1beta1/pom.xml +++ b/grpc-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 grpc-google-cloud-aiplatform-v1beta1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 0.1.0 + 0.2.0 diff --git a/pom.xml b/pom.xml index 4a53934d8..be0293a9c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-aiplatform-parent pom - 0.1.0 + 0.2.0 Google AI Platform Parent https://github.com/googleapis/java- @@ -70,23 +70,23 @@ com.google.cloud google-cloud-aiplatform - 0.1.0 + 0.2.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 com.google.cloud google-cloud-shared-dependencies - 0.15.0 + 0.17.0 pom import diff --git a/proto-google-cloud-aiplatform-v1beta1/pom.xml b/proto-google-cloud-aiplatform-v1beta1/pom.xml index 23468c2a6..d9378b3e3 100644 --- a/proto-google-cloud-aiplatform-v1beta1/pom.xml +++ b/proto-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.1.0 + 0.2.0 proto-google-cloud-aiplatform-v1beta1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 0.1.0 + 0.2.0 diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotatedDatasetName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotatedDatasetName.java new file mode 100644 index 000000000..cea6f79b3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotatedDatasetName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +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; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AnnotatedDatasetName implements ResourceName { + private static final PathTemplate PROJECT_DATASET_ANNOTATED_DATASET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}"); + private volatile Map fieldValuesMap; + private final String project; + private final String dataset; + private final String annotatedDataset; + + @Deprecated + protected AnnotatedDatasetName() { + project = null; + dataset = null; + annotatedDataset = null; + } + + private AnnotatedDatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + annotatedDataset = Preconditions.checkNotNull(builder.getAnnotatedDataset()); + } + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnnotatedDatasetName of(String project, String dataset, String annotatedDataset) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .build(); + } + + public static String format(String project, String dataset, String annotatedDataset) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .build() + .toString(); + } + + public static AnnotatedDatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_DATASET_ANNOTATED_DATASET.validatedMatch( + formattedString, "AnnotatedDatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("dataset"), matchMap.get("annotated_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 (AnnotatedDatasetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_DATASET_ANNOTATED_DATASET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (annotatedDataset != null) { + fieldMapBuilder.put("annotated_dataset", annotatedDataset); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_DATASET_ANNOTATED_DATASET.instantiate( + "project", project, "dataset", dataset, "annotated_dataset", annotatedDataset); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AnnotatedDatasetName that = ((AnnotatedDatasetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.annotatedDataset, that.annotatedDataset); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(annotatedDataset); + return h; + } + + /** Builder for projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}. */ + public static class Builder { + private String project; + private String dataset; + private String annotatedDataset; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setAnnotatedDataset(String annotatedDataset) { + this.annotatedDataset = annotatedDataset; + return this; + } + + private Builder(AnnotatedDatasetName annotatedDatasetName) { + project = annotatedDatasetName.project; + dataset = annotatedDatasetName.dataset; + annotatedDataset = annotatedDatasetName.annotatedDataset; + } + + public AnnotatedDatasetName build() { + return new AnnotatedDatasetName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationName.java index aa5de8cd7..9d28c9719 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,23 +23,39 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class AnnotationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String dataset; private final String dataItem; private final String annotation; + @Deprecated + protected AnnotationName() { + project = null; + location = null; + dataset = null; + dataItem = null; + annotation = null; + } + + private AnnotationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + dataItem = Preconditions.checkNotNull(builder.getDataItem()); + annotation = Preconditions.checkNotNull(builder.getAnnotation()); + } + public String getProject() { return project; } @@ -68,14 +84,6 @@ public Builder toBuilder() { return new Builder(this); } - private AnnotationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - dataItem = Preconditions.checkNotNull(builder.getDataItem()); - annotation = Preconditions.checkNotNull(builder.getAnnotation()); - } - public static AnnotationName of( String project, String location, String dataset, String dataItem, String annotation) { return newBuilder() @@ -104,7 +112,7 @@ public static AnnotationName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION.validatedMatch( formattedString, "AnnotationName.parse: formattedString not in valid format"); return of( matchMap.get("project"), @@ -123,7 +131,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (AnnotationName value : values) { if (value == null) { list.add(""); @@ -135,19 +143,30 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION.matches(formattedString); } + @Override 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); - fieldMapBuilder.put("dataItem", dataItem); - fieldMapBuilder.put("annotation", annotation); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (dataItem != null) { + fieldMapBuilder.put("data_item", dataItem); + } + if (annotation != null) { + fieldMapBuilder.put("annotation", annotation); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -161,7 +180,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION.instantiate( "project", project, "location", @@ -174,15 +193,51 @@ public String toString() { annotation); } - /** Builder for AnnotationName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AnnotationName that = ((AnnotationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.dataItem, that.dataItem) + && Objects.equals(this.annotation, that.annotation); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(dataItem); + h *= 1000003; + h ^= Objects.hashCode(annotation); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}. + */ + public static class Builder { private String project; private String location; private String dataset; private String dataItem; private String annotation; + protected Builder() {} + public String getProject() { return project; } @@ -228,8 +283,6 @@ public Builder setAnnotation(String annotation) { return this; } - private Builder() {} - private Builder(AnnotationName annotationName) { project = annotationName.project; location = annotationName.location; @@ -242,36 +295,4 @@ public AnnotationName build() { return new AnnotationName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AnnotationName) { - AnnotationName that = (AnnotationName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.dataItem.equals(that.dataItem)) - && (this.annotation.equals(that.annotation)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= dataItem.hashCode(); - h *= 1000003; - h ^= annotation.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationSpecName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationSpecName.java index 52fa7b531..35929d3c4 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationSpecName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationSpecName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,22 +23,36 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class AnnotationSpecName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_DATASET_ANNOTATION_SPEC = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String dataset; private final String annotationSpec; + @Deprecated + protected AnnotationSpecName() { + project = null; + location = null; + dataset = null; + annotationSpec = null; + } + + private AnnotationSpecName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + annotationSpec = Preconditions.checkNotNull(builder.getAnnotationSpec()); + } + public String getProject() { return project; } @@ -63,13 +77,6 @@ public Builder toBuilder() { return new Builder(this); } - private AnnotationSpecName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - annotationSpec = Preconditions.checkNotNull(builder.getAnnotationSpec()); - } - public static AnnotationSpecName of( String project, String location, String dataset, String annotationSpec) { return newBuilder() @@ -96,7 +103,7 @@ public static AnnotationSpecName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_DATASET_ANNOTATION_SPEC.validatedMatch( formattedString, "AnnotationSpecName.parse: formattedString not in valid format"); return of( matchMap.get("project"), @@ -114,7 +121,7 @@ public static List parseList(List formattedStrings) } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (AnnotationSpecName value : values) { if (value == null) { list.add(""); @@ -126,18 +133,27 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_DATASET_ANNOTATION_SPEC.matches(formattedString); } + @Override 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); - fieldMapBuilder.put("annotationSpec", annotationSpec); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (annotationSpec != null) { + fieldMapBuilder.put("annotation_spec", annotationSpec); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -151,7 +167,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_DATASET_ANNOTATION_SPEC.instantiate( "project", project, "location", @@ -162,14 +178,47 @@ public String toString() { annotationSpec); } - /** Builder for AnnotationSpecName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AnnotationSpecName that = ((AnnotationSpecName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.annotationSpec, that.annotationSpec); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(annotationSpec); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}. + */ + public static class Builder { private String project; private String location; private String dataset; private String annotationSpec; + protected Builder() {} + public String getProject() { return project; } @@ -206,8 +255,6 @@ public Builder setAnnotationSpec(String annotationSpec) { return this; } - private Builder() {} - private Builder(AnnotationSpecName annotationSpecName) { project = annotationSpecName.project; location = annotationSpecName.location; @@ -219,33 +266,4 @@ public AnnotationSpecName build() { return new AnnotationSpecName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AnnotationSpecName) { - AnnotationSpecName that = (AnnotationSpecName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.annotationSpec.equals(that.annotationSpec)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= annotationSpec.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJobName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJobName.java index d04287a2a..66e2f0b15 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJobName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJobName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class BatchPredictionJobName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_BATCH_PREDICTION_JOB = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String batchPredictionJob; + @Deprecated + protected BatchPredictionJobName() { + project = null; + location = null; + batchPredictionJob = null; + } + + private BatchPredictionJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + batchPredictionJob = Preconditions.checkNotNull(builder.getBatchPredictionJob()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private BatchPredictionJobName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - batchPredictionJob = Preconditions.checkNotNull(builder.getBatchPredictionJob()); - } - public static BatchPredictionJobName of( String project, String location, String batchPredictionJob) { return newBuilder() @@ -87,7 +93,7 @@ public static BatchPredictionJobName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_BATCH_PREDICTION_JOB.validatedMatch( formattedString, "BatchPredictionJobName.parse: formattedString not in valid format"); return of( matchMap.get("project"), matchMap.get("location"), matchMap.get("batch_prediction_job")); @@ -102,7 +108,7 @@ public static List parseList(List formattedStrin } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (BatchPredictionJobName value : values) { if (value == null) { list.add(""); @@ -114,17 +120,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_BATCH_PREDICTION_JOB.matches(formattedString); } + @Override 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("batchPredictionJob", batchPredictionJob); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (batchPredictionJob != null) { + fieldMapBuilder.put("batch_prediction_job", batchPredictionJob); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -138,17 +151,46 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_BATCH_PREDICTION_JOB.instantiate( "project", project, "location", location, "batch_prediction_job", batchPredictionJob); } - /** Builder for BatchPredictionJobName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + BatchPredictionJobName that = ((BatchPredictionJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.batchPredictionJob, that.batchPredictionJob); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(batchPredictionJob); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}. + */ + public static class Builder { private String project; private String location; private String batchPredictionJob; + protected Builder() {} + public String getProject() { return project; } @@ -176,8 +218,6 @@ public Builder setBatchPredictionJob(String batchPredictionJob) { return this; } - private Builder() {} - private Builder(BatchPredictionJobName batchPredictionJobName) { project = batchPredictionJobName.project; location = batchPredictionJobName.location; @@ -188,30 +228,4 @@ public BatchPredictionJobName build() { return new BatchPredictionJobName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BatchPredictionJobName) { - BatchPredictionJobName that = (BatchPredictionJobName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.batchPredictionJob.equals(that.batchPredictionJob)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= batchPredictionJob.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobName.java index 3907dc277..f501cbc7f 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class CustomJobName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_CUSTOM_JOB = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/customJobs/{custom_job}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String customJob; + @Deprecated + protected CustomJobName() { + project = null; + location = null; + customJob = null; + } + + private CustomJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + customJob = Preconditions.checkNotNull(builder.getCustomJob()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private CustomJobName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - customJob = Preconditions.checkNotNull(builder.getCustomJob()); - } - public static CustomJobName of(String project, String location, String customJob) { return newBuilder().setProject(project).setLocation(location).setCustomJob(customJob).build(); } @@ -82,7 +88,7 @@ public static CustomJobName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_CUSTOM_JOB.validatedMatch( formattedString, "CustomJobName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("custom_job")); } @@ -96,7 +102,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (CustomJobName value : values) { if (value == null) { list.add(""); @@ -108,17 +114,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_CUSTOM_JOB.matches(formattedString); } + @Override 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("customJob", customJob); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (customJob != null) { + fieldMapBuilder.put("custom_job", customJob); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,17 +145,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_CUSTOM_JOB.instantiate( "project", project, "location", location, "custom_job", customJob); } - /** Builder for CustomJobName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CustomJobName that = ((CustomJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.customJob, that.customJob); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(customJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/customJobs/{custom_job}. */ + public static class Builder { private String project; private String location; private String customJob; + protected Builder() {} + public String getProject() { return project; } @@ -170,8 +210,6 @@ public Builder setCustomJob(String customJob) { return this; } - private Builder() {} - private Builder(CustomJobName customJobName) { project = customJobName.project; location = customJobName.location; @@ -182,30 +220,4 @@ public CustomJobName build() { return new CustomJobName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof CustomJobName) { - CustomJobName that = (CustomJobName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.customJob.equals(that.customJob)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= customJob.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataItemName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataItemName.java index 6c959f4f7..324c44307 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataItemName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataItemName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,22 +23,36 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class DataItemName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_DATASET_DATA_ITEM = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String dataset; private final String dataItem; + @Deprecated + protected DataItemName() { + project = null; + location = null; + dataset = null; + dataItem = null; + } + + private DataItemName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + dataItem = Preconditions.checkNotNull(builder.getDataItem()); + } + public String getProject() { return project; } @@ -63,13 +77,6 @@ public Builder toBuilder() { return new Builder(this); } - private DataItemName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - dataItem = Preconditions.checkNotNull(builder.getDataItem()); - } - public static DataItemName of(String project, String location, String dataset, String dataItem) { return newBuilder() .setProject(project) @@ -94,7 +101,7 @@ public static DataItemName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_DATASET_DATA_ITEM.validatedMatch( formattedString, "DataItemName.parse: formattedString not in valid format"); return of( matchMap.get("project"), @@ -112,7 +119,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (DataItemName value : values) { if (value == null) { list.add(""); @@ -124,18 +131,27 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_DATASET_DATA_ITEM.matches(formattedString); } + @Override 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); - fieldMapBuilder.put("dataItem", dataItem); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (dataItem != null) { + fieldMapBuilder.put("data_item", dataItem); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -149,18 +165,50 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_DATASET_DATA_ITEM.instantiate( "project", project, "location", location, "dataset", dataset, "data_item", dataItem); } - /** Builder for DataItemName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataItemName that = ((DataItemName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.dataItem, that.dataItem); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(dataItem); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}. + */ + public static class Builder { private String project; private String location; private String dataset; private String dataItem; + protected Builder() {} + public String getProject() { return project; } @@ -197,8 +245,6 @@ public Builder setDataItem(String dataItem) { return this; } - private Builder() {} - private Builder(DataItemName dataItemName) { project = dataItemName.project; location = dataItemName.location; @@ -210,33 +256,4 @@ public DataItemName build() { return new DataItemName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof DataItemName) { - DataItemName that = (DataItemName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.dataItem.equals(that.dataItem)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= dataItem.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataLabelingJobName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataLabelingJobName.java index a1a029df4..0801fabc7 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataLabelingJobName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DataLabelingJobName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class DataLabelingJobName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_DATA_LABELING_JOB = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String dataLabelingJob; + @Deprecated + protected DataLabelingJobName() { + project = null; + location = null; + dataLabelingJob = null; + } + + private DataLabelingJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataLabelingJob = Preconditions.checkNotNull(builder.getDataLabelingJob()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private DataLabelingJobName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataLabelingJob = Preconditions.checkNotNull(builder.getDataLabelingJob()); - } - public static DataLabelingJobName of(String project, String location, String dataLabelingJob) { return newBuilder() .setProject(project) @@ -86,7 +92,7 @@ public static DataLabelingJobName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_DATA_LABELING_JOB.validatedMatch( formattedString, "DataLabelingJobName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("data_labeling_job")); } @@ -100,7 +106,7 @@ public static List parseList(List formattedStrings) } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (DataLabelingJobName value : values) { if (value == null) { list.add(""); @@ -112,17 +118,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_DATA_LABELING_JOB.matches(formattedString); } + @Override 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("dataLabelingJob", dataLabelingJob); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataLabelingJob != null) { + fieldMapBuilder.put("data_labeling_job", dataLabelingJob); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -136,17 +149,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_DATA_LABELING_JOB.instantiate( "project", project, "location", location, "data_labeling_job", dataLabelingJob); } - /** Builder for DataLabelingJobName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataLabelingJobName that = ((DataLabelingJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataLabelingJob, that.dataLabelingJob); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataLabelingJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}. */ + public static class Builder { private String project; private String location; private String dataLabelingJob; + protected Builder() {} + public String getProject() { return project; } @@ -174,8 +214,6 @@ public Builder setDataLabelingJob(String dataLabelingJob) { return this; } - private Builder() {} - private Builder(DataLabelingJobName dataLabelingJobName) { project = dataLabelingJobName.project; location = dataLabelingJobName.location; @@ -186,30 +224,4 @@ public DataLabelingJobName build() { return new DataLabelingJobName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof DataLabelingJobName) { - DataLabelingJobName that = (DataLabelingJobName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataLabelingJob.equals(that.dataLabelingJob)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataLabelingJob.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetName.java index e8c2c2821..c7b27cc8f 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DatasetName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class DatasetName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_DATASET = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/datasets/{dataset}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String dataset; + @Deprecated + protected DatasetName() { + project = null; + location = null; + dataset = null; + } + + private DatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ 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(); } @@ -82,7 +88,7 @@ public static DatasetName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_DATASET.validatedMatch( formattedString, "DatasetName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("dataset")); } @@ -96,7 +102,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (DatasetName value : values) { if (value == null) { list.add(""); @@ -108,17 +114,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_DATASET.matches(formattedString); } + @Override 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); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,16 +145,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location, "dataset", dataset); + return PROJECT_LOCATION_DATASET.instantiate( + "project", project, "location", location, "dataset", dataset); } - /** Builder for DatasetName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DatasetName that = ((DatasetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataset, that.dataset); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataset); + return h; + } + + /** Builder for projects/{project}/locations/{location}/datasets/{dataset}. */ + public static class Builder { private String project; private String location; private String dataset; + protected Builder() {} + public String getProject() { return project; } @@ -169,8 +210,6 @@ public Builder setDataset(String dataset) { return this; } - private Builder() {} - private Builder(DatasetName datasetName) { project = datasetName.project; location = datasetName.location; @@ -181,30 +220,4 @@ 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-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointName.java index 1cf95a5c8..79c63a12c 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class EndpointName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_ENDPOINT = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/endpoints/{endpoint}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String endpoint; + @Deprecated + protected EndpointName() { + project = null; + location = null; + endpoint = null; + } + + private EndpointName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + endpoint = Preconditions.checkNotNull(builder.getEndpoint()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private EndpointName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - endpoint = Preconditions.checkNotNull(builder.getEndpoint()); - } - public static EndpointName of(String project, String location, String endpoint) { return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); } @@ -82,7 +88,7 @@ public static EndpointName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_ENDPOINT.validatedMatch( formattedString, "EndpointName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("endpoint")); } @@ -96,7 +102,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (EndpointName value : values) { if (value == null) { list.add(""); @@ -108,17 +114,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_ENDPOINT.matches(formattedString); } + @Override 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("endpoint", endpoint); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (endpoint != null) { + fieldMapBuilder.put("endpoint", endpoint); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,17 +145,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_ENDPOINT.instantiate( "project", project, "location", location, "endpoint", endpoint); } - /** Builder for EndpointName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EndpointName that = ((EndpointName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.endpoint, that.endpoint); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(endpoint); + return h; + } + + /** Builder for projects/{project}/locations/{location}/endpoints/{endpoint}. */ + public static class Builder { private String project; private String location; private String endpoint; + protected Builder() {} + public String getProject() { return project; } @@ -170,8 +210,6 @@ public Builder setEndpoint(String endpoint) { return this; } - private Builder() {} - private Builder(EndpointName endpointName) { project = endpointName.project; location = endpointName.location; @@ -182,30 +220,4 @@ public EndpointName build() { return new EndpointName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof EndpointName) { - EndpointName that = (EndpointName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.endpoint.equals(that.endpoint)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= endpoint.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/HyperparameterTuningJobName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/HyperparameterTuningJobName.java index 39f96e74b..ec7d910c6 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/HyperparameterTuningJobName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/HyperparameterTuningJobName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class HyperparameterTuningJobName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String hyperparameterTuningJob; + @Deprecated + protected HyperparameterTuningJobName() { + project = null; + location = null; + hyperparameterTuningJob = null; + } + + private HyperparameterTuningJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + hyperparameterTuningJob = Preconditions.checkNotNull(builder.getHyperparameterTuningJob()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private HyperparameterTuningJobName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - hyperparameterTuningJob = Preconditions.checkNotNull(builder.getHyperparameterTuningJob()); - } - public static HyperparameterTuningJobName of( String project, String location, String hyperparameterTuningJob) { return newBuilder() @@ -87,7 +93,7 @@ public static HyperparameterTuningJobName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB.validatedMatch( formattedString, "HyperparameterTuningJobName.parse: formattedString not in valid format"); return of( @@ -105,7 +111,7 @@ public static List parseList(List formatted } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (HyperparameterTuningJobName value : values) { if (value == null) { list.add(""); @@ -117,17 +123,24 @@ public static List toStringList(List values } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB.matches(formattedString); } + @Override 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("hyperparameterTuningJob", hyperparameterTuningJob); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (hyperparameterTuningJob != null) { + fieldMapBuilder.put("hyperparameter_tuning_job", hyperparameterTuningJob); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -141,7 +154,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB.instantiate( "project", project, "location", @@ -150,13 +163,43 @@ public String toString() { hyperparameterTuningJob); } - /** Builder for HyperparameterTuningJobName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + HyperparameterTuningJobName that = ((HyperparameterTuningJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.hyperparameterTuningJob, that.hyperparameterTuningJob); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(hyperparameterTuningJob); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}. + */ + public static class Builder { private String project; private String location; private String hyperparameterTuningJob; + protected Builder() {} + public String getProject() { return project; } @@ -184,8 +227,6 @@ public Builder setHyperparameterTuningJob(String hyperparameterTuningJob) { return this; } - private Builder() {} - private Builder(HyperparameterTuningJobName hyperparameterTuningJobName) { project = hyperparameterTuningJobName.project; location = hyperparameterTuningJobName.location; @@ -196,30 +237,4 @@ public HyperparameterTuningJobName build() { return new HyperparameterTuningJobName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof HyperparameterTuningJobName) { - HyperparameterTuningJobName that = (HyperparameterTuningJobName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.hyperparameterTuningJob.equals(that.hyperparameterTuningJob)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= hyperparameterTuningJob.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LocationName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LocationName.java index 0caaecd36..95ce9514a 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LocationName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LocationName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,19 +23,29 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class LocationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION = PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + public String getProject() { return project; } @@ -52,11 +62,6 @@ 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(); } @@ -70,7 +75,7 @@ public static LocationName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION.validatedMatch( formattedString, "LocationName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location")); } @@ -84,7 +89,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (LocationName value : values) { if (value == null) { list.add(""); @@ -96,16 +101,21 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -119,15 +129,39 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location); + return PROJECT_LOCATION.instantiate("project", project, "location", location); } - /** Builder for LocationName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { private String project; private String location; + protected Builder() {} + public String getProject() { return project; } @@ -146,8 +180,6 @@ public Builder setLocation(String location) { return this; } - private Builder() {} - private Builder(LocationName locationName) { project = locationName.project; location = locationName.location; @@ -157,26 +189,4 @@ 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-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationName.java index 41dabd09d..894e4e2b4 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,22 +23,36 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class ModelEvaluationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_MODEL_EVALUATION = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String model; private final String evaluation; + @Deprecated + protected ModelEvaluationName() { + project = null; + location = null; + model = null; + evaluation = null; + } + + private ModelEvaluationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + model = Preconditions.checkNotNull(builder.getModel()); + evaluation = Preconditions.checkNotNull(builder.getEvaluation()); + } + public String getProject() { return project; } @@ -63,13 +77,6 @@ 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()); - evaluation = Preconditions.checkNotNull(builder.getEvaluation()); - } - public static ModelEvaluationName of( String project, String location, String model, String evaluation) { return newBuilder() @@ -95,7 +102,7 @@ public static ModelEvaluationName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_MODEL_EVALUATION.validatedMatch( formattedString, "ModelEvaluationName.parse: formattedString not in valid format"); return of( matchMap.get("project"), @@ -113,7 +120,7 @@ public static List parseList(List formattedStrings) } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (ModelEvaluationName value : values) { if (value == null) { list.add(""); @@ -125,18 +132,27 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_MODEL_EVALUATION.matches(formattedString); } + @Override 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("evaluation", evaluation); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + if (evaluation != null) { + fieldMapBuilder.put("evaluation", evaluation); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -150,18 +166,50 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_MODEL_EVALUATION.instantiate( "project", project, "location", location, "model", model, "evaluation", evaluation); } - /** Builder for ModelEvaluationName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ModelEvaluationName that = ((ModelEvaluationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.model, that.model) + && Objects.equals(this.evaluation, that.evaluation); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(model); + h *= 1000003; + h ^= Objects.hashCode(evaluation); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}. + */ + public static class Builder { private String project; private String location; private String model; private String evaluation; + protected Builder() {} + public String getProject() { return project; } @@ -198,8 +246,6 @@ public Builder setEvaluation(String evaluation) { return this; } - private Builder() {} - private Builder(ModelEvaluationName modelEvaluationName) { project = modelEvaluationName.project; location = modelEvaluationName.location; @@ -211,33 +257,4 @@ 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.evaluation.equals(that.evaluation)); - } - 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 ^= evaluation.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationSliceName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationSliceName.java index cbe303d11..24470b9e0 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationSliceName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelEvaluationSliceName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,23 +23,39 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class ModelEvaluationSliceName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_MODEL_EVALUATION_SLICE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String model; private final String evaluation; private final String slice; + @Deprecated + protected ModelEvaluationSliceName() { + project = null; + location = null; + model = null; + evaluation = null; + slice = null; + } + + private ModelEvaluationSliceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + model = Preconditions.checkNotNull(builder.getModel()); + evaluation = Preconditions.checkNotNull(builder.getEvaluation()); + slice = Preconditions.checkNotNull(builder.getSlice()); + } + public String getProject() { return project; } @@ -68,14 +84,6 @@ public Builder toBuilder() { return new Builder(this); } - private ModelEvaluationSliceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - model = Preconditions.checkNotNull(builder.getModel()); - evaluation = Preconditions.checkNotNull(builder.getEvaluation()); - slice = Preconditions.checkNotNull(builder.getSlice()); - } - public static ModelEvaluationSliceName of( String project, String location, String model, String evaluation, String slice) { return newBuilder() @@ -104,7 +112,7 @@ public static ModelEvaluationSliceName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_MODEL_EVALUATION_SLICE.validatedMatch( formattedString, "ModelEvaluationSliceName.parse: formattedString not in valid format"); return of( matchMap.get("project"), @@ -123,7 +131,7 @@ public static List parseList(List formattedStr } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (ModelEvaluationSliceName value : values) { if (value == null) { list.add(""); @@ -135,19 +143,30 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_MODEL_EVALUATION_SLICE.matches(formattedString); } + @Override 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("evaluation", evaluation); - fieldMapBuilder.put("slice", slice); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + if (evaluation != null) { + fieldMapBuilder.put("evaluation", evaluation); + } + if (slice != null) { + fieldMapBuilder.put("slice", slice); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -161,7 +180,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_MODEL_EVALUATION_SLICE.instantiate( "project", project, "location", @@ -174,15 +193,51 @@ public String toString() { slice); } - /** Builder for ModelEvaluationSliceName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ModelEvaluationSliceName that = ((ModelEvaluationSliceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.model, that.model) + && Objects.equals(this.evaluation, that.evaluation) + && Objects.equals(this.slice, that.slice); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(model); + h *= 1000003; + h ^= Objects.hashCode(evaluation); + h *= 1000003; + h ^= Objects.hashCode(slice); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}. + */ + public static class Builder { private String project; private String location; private String model; private String evaluation; private String slice; + protected Builder() {} + public String getProject() { return project; } @@ -228,8 +283,6 @@ public Builder setSlice(String slice) { return this; } - private Builder() {} - private Builder(ModelEvaluationSliceName modelEvaluationSliceName) { project = modelEvaluationSliceName.project; location = modelEvaluationSliceName.location; @@ -242,36 +295,4 @@ public ModelEvaluationSliceName build() { return new ModelEvaluationSliceName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ModelEvaluationSliceName) { - ModelEvaluationSliceName that = (ModelEvaluationSliceName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.model.equals(that.model)) - && (this.evaluation.equals(that.evaluation)) - && (this.slice.equals(that.slice)); - } - 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 ^= evaluation.hashCode(); - h *= 1000003; - h ^= slice.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelName.java index a6b20f59b..1e9582a23 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class ModelName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_MODEL = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/models/{model}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String model; + @Deprecated + protected ModelName() { + project = null; + location = null; + model = null; + } + + private ModelName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + model = Preconditions.checkNotNull(builder.getModel()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ 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(); } @@ -82,7 +88,7 @@ public static ModelName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_MODEL.validatedMatch( formattedString, "ModelName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("model")); } @@ -96,7 +102,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (ModelName value : values) { if (value == null) { list.add(""); @@ -108,17 +114,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_MODEL.matches(formattedString); } + @Override 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); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,16 +145,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location, "model", model); + return PROJECT_LOCATION_MODEL.instantiate( + "project", project, "location", location, "model", model); } - /** Builder for ModelName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ModelName that = ((ModelName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.model, that.model); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(model); + return h; + } + + /** Builder for projects/{project}/locations/{location}/models/{model}. */ + public static class Builder { private String project; private String location; private String model; + protected Builder() {} + public String getProject() { return project; } @@ -169,8 +210,6 @@ public Builder setModel(String model) { return this; } - private Builder() {} - private Builder(ModelName modelName) { project = modelName.project; location = modelName.location; @@ -181,30 +220,4 @@ 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-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolName.java index 1ba14b27e..beabbcd17 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class SpecialistPoolName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_SPECIALIST_POOL = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/specialistPools/{specialist_pool}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String specialistPool; + @Deprecated + protected SpecialistPoolName() { + project = null; + location = null; + specialistPool = null; + } + + private SpecialistPoolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + specialistPool = Preconditions.checkNotNull(builder.getSpecialistPool()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private SpecialistPoolName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - specialistPool = Preconditions.checkNotNull(builder.getSpecialistPool()); - } - public static SpecialistPoolName of(String project, String location, String specialistPool) { return newBuilder() .setProject(project) @@ -86,7 +92,7 @@ public static SpecialistPoolName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_SPECIALIST_POOL.validatedMatch( formattedString, "SpecialistPoolName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("specialist_pool")); } @@ -100,7 +106,7 @@ public static List parseList(List formattedStrings) } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (SpecialistPoolName value : values) { if (value == null) { list.add(""); @@ -112,17 +118,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_SPECIALIST_POOL.matches(formattedString); } + @Override 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("specialistPool", specialistPool); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (specialistPool != null) { + fieldMapBuilder.put("specialist_pool", specialistPool); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -136,17 +149,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_SPECIALIST_POOL.instantiate( "project", project, "location", location, "specialist_pool", specialistPool); } - /** Builder for SpecialistPoolName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SpecialistPoolName that = ((SpecialistPoolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.specialistPool, that.specialistPool); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(specialistPool); + return h; + } + + /** Builder for projects/{project}/locations/{location}/specialistPools/{specialist_pool}. */ + public static class Builder { private String project; private String location; private String specialistPool; + protected Builder() {} + public String getProject() { return project; } @@ -174,8 +214,6 @@ public Builder setSpecialistPool(String specialistPool) { return this; } - private Builder() {} - private Builder(SpecialistPoolName specialistPoolName) { project = specialistPoolName.project; location = specialistPoolName.location; @@ -186,30 +224,4 @@ public SpecialistPoolName build() { return new SpecialistPoolName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof SpecialistPoolName) { - SpecialistPoolName that = (SpecialistPoolName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.specialistPool.equals(that.specialistPool)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= specialistPool.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TrainingPipelineName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TrainingPipelineName.java index 8309f6e74..654873e0e 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TrainingPipelineName.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TrainingPipelineName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://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, @@ -23,21 +23,33 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class TrainingPipelineName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROJECT_LOCATION_TRAINING_PIPELINE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}"); - private volatile Map fieldValuesMap; - private final String project; private final String location; private final String trainingPipeline; + @Deprecated + protected TrainingPipelineName() { + project = null; + location = null; + trainingPipeline = null; + } + + private TrainingPipelineName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + trainingPipeline = Preconditions.checkNotNull(builder.getTrainingPipeline()); + } + public String getProject() { return project; } @@ -58,12 +70,6 @@ public Builder toBuilder() { return new Builder(this); } - private TrainingPipelineName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - trainingPipeline = Preconditions.checkNotNull(builder.getTrainingPipeline()); - } - public static TrainingPipelineName of(String project, String location, String trainingPipeline) { return newBuilder() .setProject(project) @@ -86,7 +92,7 @@ public static TrainingPipelineName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROJECT_LOCATION_TRAINING_PIPELINE.validatedMatch( formattedString, "TrainingPipelineName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("training_pipeline")); } @@ -100,7 +106,7 @@ public static List parseList(List formattedStrings } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (TrainingPipelineName value : values) { if (value == null) { list.add(""); @@ -112,17 +118,24 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_LOCATION_TRAINING_PIPELINE.matches(formattedString); } + @Override 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("trainingPipeline", trainingPipeline); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (trainingPipeline != null) { + fieldMapBuilder.put("training_pipeline", trainingPipeline); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -136,17 +149,44 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROJECT_LOCATION_TRAINING_PIPELINE.instantiate( "project", project, "location", location, "training_pipeline", trainingPipeline); } - /** Builder for TrainingPipelineName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TrainingPipelineName that = ((TrainingPipelineName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.trainingPipeline, that.trainingPipeline); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(trainingPipeline); + return h; + } + + /** Builder for projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}. */ + public static class Builder { private String project; private String location; private String trainingPipeline; + protected Builder() {} + public String getProject() { return project; } @@ -174,8 +214,6 @@ public Builder setTrainingPipeline(String trainingPipeline) { return this; } - private Builder() {} - private Builder(TrainingPipelineName trainingPipelineName) { project = trainingPipelineName.project; location = trainingPipelineName.location; @@ -186,30 +224,4 @@ public TrainingPipelineName build() { return new TrainingPipelineName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof TrainingPipelineName) { - TrainingPipelineName that = (TrainingPipelineName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.trainingPipeline.equals(that.trainingPipeline)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= trainingPipeline.hashCode(); - return h; - } } diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VersionName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VersionName.java new file mode 100644 index 000000000..38396a473 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VersionName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +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; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class VersionName implements ResourceName { + private static final PathTemplate PROJECT_MODEL_VERSION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/models/{model}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String model; + private final String version; + + @Deprecated + protected VersionName() { + project = null; + model = null; + version = null; + } + + private VersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + model = Preconditions.checkNotNull(builder.getModel()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getModel() { + return model; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static VersionName of(String project, String model, String version) { + return newBuilder().setProject(project).setModel(model).setVersion(version).build(); + } + + public static String format(String project, String model, String version) { + return newBuilder().setProject(project).setModel(model).setVersion(version).build().toString(); + } + + public static VersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_MODEL_VERSION.validatedMatch( + formattedString, "VersionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("model"), matchMap.get("version")); + } + + 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 (VersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_MODEL_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_MODEL_VERSION.instantiate( + "project", project, "model", model, "version", version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + VersionName that = ((VersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.model, that.model) + && Objects.equals(this.version, that.version); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(model); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** Builder for projects/{project}/models/{model}/versions/{version}. */ + public static class Builder { + private String project; + private String model; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getModel() { + return model; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(VersionName versionName) { + project = versionName.project; + model = versionName.model; + version = versionName.version; + } + + public VersionName build() { + return new VersionName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstance.java new file mode 100644 index 000000000..ea1ece5e1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstance.java @@ -0,0 +1,948 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance} + */ +public final class ImageClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance) + ImageClassificationPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageClassificationPredictionInstance.newBuilder() to construct. + private ImageClassificationPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageClassificationPredictionInstance() { + content_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageClassificationPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageClassificationPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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; + } + } + + 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_); + } + 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_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Image Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageClassificationPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageClassificationPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .ImageClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..26ab9086b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface ImageClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..c190936dc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class ImageClassificationPredictionInstanceProto { + private ImageClassificationPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nRgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/image_classification.p" + + "roto\0227google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.instance\032\034google/api/annota" + + "tions.proto\"K\n%ImageClassificationPredic" + + "tionInstance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_ty" + + "pe\030\002 \001(\tB\314\001\n;com.google.cloud.aiplatform" + + ".v1beta1.schema.predict.instanceB*ImageC" + + "lassificationPredictionInstanceProtoP\001Z_" + + "google.golang.org/genproto/googleapis/cl" + + "oud/aiplatform/v1beta1/schema/predict/in" + + "stance;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java new file mode 100644 index 000000000..f240c150a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java @@ -0,0 +1,948 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance} + */ +public final class ImageObjectDetectionPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + ImageObjectDetectionPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageObjectDetectionPredictionInstance.newBuilder() to construct. + private ImageObjectDetectionPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageObjectDetectionPredictionInstance() { + content_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageObjectDetectionPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageObjectDetectionPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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; + } + } + + 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_); + } + 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_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Image Object Detection.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes or GCS URI to make the prediction on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/gif
+     * - image/png
+     * - image/webp
+     * - image/bmp
+     * - image/tiff
+     * - image/vnd.microsoft.icon
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageObjectDetectionPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageObjectDetectionPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..b905e08b3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface ImageObjectDetectionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The image bytes or GCS URI to make the prediction on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/gif
+   * - image/png
+   * - image/webp
+   * - image/bmp
+   * - image/tiff
+   * - image/vnd.microsoft.icon
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java new file mode 100644 index 000000000..d1a0dcf33 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class ImageObjectDetectionPredictionInstanceProto { + private ImageObjectDetectionPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nTgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/image_object_detection" + + ".proto\0227google.cloud.aiplatform.v1beta1." + + "schema.predict.instance\032\034google/api/anno" + + "tations.proto\"L\n&ImageObjectDetectionPre" + + "dictionInstance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime" + + "_type\030\002 \001(\tB\315\001\n;com.google.cloud.aiplatf" + + "orm.v1beta1.schema.predict.instanceB+Ima" + + "geObjectDetectionPredictionInstanceProto" + + "P\001Z_google.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1beta1/schema/predic" + + "t/instance;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstance.java new file mode 100644 index 000000000..c3e088f55 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstance.java @@ -0,0 +1,912 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance} + */ +public final class ImageSegmentationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance) + ImageSegmentationPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageSegmentationPredictionInstance.newBuilder() to construct. + private ImageSegmentationPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageSegmentationPredictionInstance() { + content_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageSegmentationPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageSegmentationPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The image bytes to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The image bytes to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/png
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/png
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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; + } + } + + 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_); + } + 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_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Image Segmentation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The image bytes to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The image bytes to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The image bytes to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/png
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/png
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/png
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/png
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the image. Only the images in below listed
+     * MIME types are supported.
+     * - image/jpeg
+     * - image/png
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSegmentationPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSegmentationPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .ImageSegmentationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..5499ee136 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface ImageSegmentationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageSegmentationPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The image bytes to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The image bytes to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/png
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the image. Only the images in below listed
+   * MIME types are supported.
+   * - image/jpeg
+   * - image/png
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java new file mode 100644 index 000000000..54069c5d8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class ImageSegmentationPredictionInstanceProto { + private ImageSegmentationPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nPgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/image_segmentation.pro" + + "to\0227google.cloud.aiplatform.v1beta1.sche" + + "ma.predict.instance\032\034google/api/annotati" + + "ons.proto\"I\n#ImageSegmentationPrediction" + + "Instance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002" + + " \001(\tB\312\001\n;com.google.cloud.aiplatform.v1b" + + "eta1.schema.predict.instanceB(ImageSegme" + + "ntationPredictionInstanceProtoP\001Z_google" + + ".golang.org/genproto/googleapis/cloud/ai" + + "platform/v1beta1/schema/predict/instance" + + ";instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstance.java new file mode 100644 index 000000000..e7ff0799c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstance.java @@ -0,0 +1,905 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance} + */ +public final class TextClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance) + TextClassificationPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextClassificationPredictionInstance.newBuilder() to construct. + private TextClassificationPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextClassificationPredictionInstance() { + content_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextClassificationPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextClassificationPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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; + } + } + + 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_); + } + 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_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Text Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextClassificationPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextClassificationPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .TextClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..b31eedbe5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface TextClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..e0a61a9bd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class TextClassificationPredictionInstanceProto { + private TextClassificationPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nQgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/text_classification.pr" + + "oto\0227google.cloud.aiplatform.v1beta1.sch" + + "ema.predict.instance\032\034google/api/annotat" + + "ions.proto\"J\n$TextClassificationPredicti" + + "onInstance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type" + + "\030\002 \001(\tB\313\001\n;com.google.cloud.aiplatform.v" + + "1beta1.schema.predict.instanceB)TextClas" + + "sificationPredictionInstanceProtoP\001Z_goo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/aiplatform/v1beta1/schema/predict/insta" + + "nce;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextClassificationPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstance.java new file mode 100644 index 000000000..affd77d1b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstance.java @@ -0,0 +1,1106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Extraction.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance} + */ +public final class TextExtractionPredictionInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance) + TextExtractionPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextExtractionPredictionInstance.newBuilder() to construct. + private TextExtractionPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextExtractionPredictionInstance() { + content_ = ""; + mimeType_ = ""; + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextExtractionPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextExtractionPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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 KEY_FIELD_NUMBER = 3; + private volatile java.lang.Object key_; + /** + * + * + *
+   * This field is only used for batch prediction. If a key is provided, the
+   * batch prediction result will by mapped to this key. If omitted, then the
+   * batch prediction result will contain the entire input instance. AI Platform
+   * will not check if keys in the request are duplicates, so it is up to the
+   * caller to ensure the keys are unique.
+   * 
+ * + * string key = 3; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * This field is only used for batch prediction. If a key is provided, the
+   * batch prediction result will by mapped to this key. If omitted, then the
+   * batch prediction result will contain the entire input instance. AI Platform
+   * will not check if keys in the request are duplicates, so it is up to the
+   * caller to ensure the keys are unique.
+   * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = 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 (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, key_); + } + 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 (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, key_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getKey().equals(other.getKey())) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Text Extraction.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance.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_ = ""; + + key_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + result.key_ = key_; + 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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + 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.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + 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 key_ = ""; + /** + * + * + *
+     * This field is only used for batch prediction. If a key is provided, the
+     * batch prediction result will by mapped to this key. If omitted, then the
+     * batch prediction result will contain the entire input instance. AI Platform
+     * will not check if keys in the request are duplicates, so it is up to the
+     * caller to ensure the keys are unique.
+     * 
+ * + * string key = 3; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This field is only used for batch prediction. If a key is provided, the
+     * batch prediction result will by mapped to this key. If omitted, then the
+     * batch prediction result will contain the entire input instance. AI Platform
+     * will not check if keys in the request are duplicates, so it is up to the
+     * caller to ensure the keys are unique.
+     * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This field is only used for batch prediction. If a key is provided, the
+     * batch prediction result will by mapped to this key. If omitted, then the
+     * batch prediction result will contain the entire input instance. AI Platform
+     * will not check if keys in the request are duplicates, so it is up to the
+     * caller to ensure the keys are unique.
+     * 
+ * + * string key = 3; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field is only used for batch prediction. If a key is provided, the
+     * batch prediction result will by mapped to this key. If omitted, then the
+     * batch prediction result will contain the entire input instance. AI Platform
+     * will not check if keys in the request are duplicates, so it is up to the
+     * caller to ensure the keys are unique.
+     * 
+ * + * string key = 3; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * This field is only used for batch prediction. If a key is provided, the
+     * batch prediction result will by mapped to this key. If omitted, then the
+     * batch prediction result will contain the entire input instance. AI Platform
+     * will not check if keys in the request are duplicates, so it is up to the
+     * caller to ensure the keys are unique.
+     * 
+ * + * string key = 3; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = 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.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextExtractionPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextExtractionPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .TextExtractionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..38143cefb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface TextExtractionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextExtractionPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * This field is only used for batch prediction. If a key is provided, the
+   * batch prediction result will by mapped to this key. If omitted, then the
+   * batch prediction result will contain the entire input instance. AI Platform
+   * will not check if keys in the request are duplicates, so it is up to the
+   * caller to ensure the keys are unique.
+   * 
+ * + * string key = 3; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * This field is only used for batch prediction. If a key is provided, the
+   * batch prediction result will by mapped to this key. If omitted, then the
+   * batch prediction result will contain the entire input instance. AI Platform
+   * will not check if keys in the request are duplicates, so it is up to the
+   * caller to ensure the keys are unique.
+   * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceProto.java new file mode 100644 index 000000000..e4a807945 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class TextExtractionPredictionInstanceProto { + private TextExtractionPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nMgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/text_extraction.proto\022" + + "7google.cloud.aiplatform.v1beta1.schema." + + "predict.instance\032\034google/api/annotations" + + ".proto\"S\n TextExtractionPredictionInstan" + + "ce\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t\022\013" + + "\n\003key\030\003 \001(\tB\307\001\n;com.google.cloud.aiplatf" + + "orm.v1beta1.schema.predict.instanceB%Tex" + + "tExtractionPredictionInstanceProtoP\001Z_go" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/aiplatform/v1beta1/schema/predict/inst" + + "ance;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextExtractionPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", "Key", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstance.java new file mode 100644 index 000000000..acbe470d8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstance.java @@ -0,0 +1,898 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Sentiment.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance} + */ +public final class TextSentimentPredictionInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance) + TextSentimentPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextSentimentPredictionInstance.newBuilder() to construct. + private TextSentimentPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextSentimentPredictionInstance() { + content_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextSentimentPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextSentimentPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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; + } + } + + 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_); + } + 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_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Text Sentiment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The text snippet to make the predictions on.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the text snippet. The supported MIME types are listed
+     * below.
+     * - text/plain
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextSentimentPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextSentimentPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..71b53ba6d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface TextSentimentPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The text snippet to make the predictions on.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the text snippet. The supported MIME types are listed
+   * below.
+   * - text/plain
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceProto.java new file mode 100644 index 000000000..b819ce26d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class TextSentimentPredictionInstanceProto { + private TextSentimentPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nLgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/text_sentiment.proto\0227" + + "google.cloud.aiplatform.v1beta1.schema.p" + + "redict.instance\032\034google/api/annotations." + + "proto\"E\n\037TextSentimentPredictionInstance" + + "\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\tB\306\001\n" + + ";com.google.cloud.aiplatform.v1beta1.sch" + + "ema.predict.instanceB$TextSentimentPredi" + + "ctionInstanceProtoP\001Z_google.golang.org/" + + "genproto/googleapis/cloud/aiplatform/v1b" + + "eta1/schema/predict/instance;instanceb\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_TextSentimentPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java new file mode 100644 index 000000000..e1e72bacd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance} + */ +public final class VideoActionRecognitionPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + VideoActionRecognitionPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoActionRecognitionPredictionInstance.newBuilder() to construct. + private VideoActionRecognitionPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoActionRecognitionPredictionInstance() { + content_ = ""; + mimeType_ = ""; + timeSegmentStart_ = ""; + timeSegmentEnd_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoActionRecognitionPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoActionRecognitionPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentStart_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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 TIME_SEGMENT_START_FIELD_NUMBER = 3; + private volatile java.lang.Object timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + 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(); + timeSegmentStart_ = s; + return s; + } + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 4; + private volatile java.lang.Object timeSegmentEnd_; + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + 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(); + timeSegmentEnd_ = s; + return s; + } + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = 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 (!getTimeSegmentStartBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, timeSegmentEnd_); + } + 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 (!getTimeSegmentStartBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, timeSegmentEnd_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) 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) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Video Action Recognition.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance.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_ = ""; + + timeSegmentStart_ = ""; + + timeSegmentEnd_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + result.timeSegmentStart_ = timeSegmentStart_; + result.timeSegmentEnd_ = timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getTimeSegmentStart().isEmpty()) { + timeSegmentStart_ = other.timeSegmentStart_; + onChanged(); + } + if (!other.getTimeSegmentEnd().isEmpty()) { + timeSegmentEnd_ = other.timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + 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 timeSegmentStart_ = ""; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentStart_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStart(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentStart_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentStart() { + + timeSegmentStart_ = getDefaultInstance().getTimeSegmentStart(); + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The bytes for timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStartBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentStart_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeSegmentEnd_ = ""; + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentEnd_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEnd(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentEnd_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentEnd() { + + timeSegmentEnd_ = getDefaultInstance().getTimeSegmentEnd(); + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The bytes for timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEndBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoActionRecognitionPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoActionRecognitionPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..dffb8c25d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface VideoActionRecognitionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + java.lang.String getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + com.google.protobuf.ByteString getTimeSegmentStartBytes(); + + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + java.lang.String getTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + com.google.protobuf.ByteString getTimeSegmentEndBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java new file mode 100644 index 000000000..7a3e069c0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class VideoActionRecognitionPredictionInstanceProto { + private VideoActionRecognitionPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nVgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/video_action_recogniti" + + "on.proto\0227google.cloud.aiplatform.v1beta" + + "1.schema.predict.instance\032\034google/api/an" + + "notations.proto\"\204\001\n(VideoActionRecogniti" + + "onPredictionInstance\022\017\n\007content\030\001 \001(\t\022\021\n" + + "\tmime_type\030\002 \001(\t\022\032\n\022time_segment_start\030\003" + + " \001(\t\022\030\n\020time_segment_end\030\004 \001(\tB\317\001\n;com.g" + + "oogle.cloud.aiplatform.v1beta1.schema.pr" + + "edict.instanceB-VideoActionRecognitionPr" + + "edictionInstanceProtoP\001Z_google.golang.o" + + "rg/genproto/googleapis/cloud/aiplatform/" + + "v1beta1/schema/predict/instance;instance" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", "TimeSegmentStart", "TimeSegmentEnd", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstance.java new file mode 100644 index 000000000..daf0868d1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstance.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance} + */ +public final class VideoClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance) + VideoClassificationPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoClassificationPredictionInstance.newBuilder() to construct. + private VideoClassificationPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoClassificationPredictionInstance() { + content_ = ""; + mimeType_ = ""; + timeSegmentStart_ = ""; + timeSegmentEnd_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoClassificationPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoClassificationPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentStart_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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 TIME_SEGMENT_START_FIELD_NUMBER = 3; + private volatile java.lang.Object timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + 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(); + timeSegmentStart_ = s; + return s; + } + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 4; + private volatile java.lang.Object timeSegmentEnd_; + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + 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(); + timeSegmentEnd_ = s; + return s; + } + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = 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 (!getTimeSegmentStartBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, timeSegmentEnd_); + } + 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 (!getTimeSegmentStartBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, timeSegmentEnd_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) 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) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Video Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance.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_ = ""; + + timeSegmentStart_ = ""; + + timeSegmentEnd_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + result.timeSegmentStart_ = timeSegmentStart_; + result.timeSegmentEnd_ = timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getTimeSegmentStart().isEmpty()) { + timeSegmentStart_ = other.timeSegmentStart_; + onChanged(); + } + if (!other.getTimeSegmentEnd().isEmpty()) { + timeSegmentEnd_ = other.timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + 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 timeSegmentStart_ = ""; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentStart_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStart(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentStart_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentStart() { + + timeSegmentStart_ = getDefaultInstance().getTimeSegmentStart(); + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The bytes for timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStartBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentStart_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeSegmentEnd_ = ""; + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentEnd_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEnd(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentEnd_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentEnd() { + + timeSegmentEnd_ = getDefaultInstance().getTimeSegmentEnd(); + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The bytes for timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEndBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoClassificationPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoClassificationPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .VideoClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..c48b70440 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface VideoClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoClassificationPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + java.lang.String getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + com.google.protobuf.ByteString getTimeSegmentStartBytes(); + + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + java.lang.String getTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + com.google.protobuf.ByteString getTimeSegmentEndBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..05fdff996 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class VideoClassificationPredictionInstanceProto { + private VideoClassificationPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nRgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/video_classification.p" + + "roto\0227google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.instance\032\034google/api/annota" + + "tions.proto\"\201\001\n%VideoClassificationPredi" + + "ctionInstance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_t" + + "ype\030\002 \001(\t\022\032\n\022time_segment_start\030\003 \001(\t\022\030\n" + + "\020time_segment_end\030\004 \001(\tB\314\001\n;com.google.c" + + "loud.aiplatform.v1beta1.schema.predict.i" + + "nstanceB*VideoClassificationPredictionIn" + + "stanceProtoP\001Z_google.golang.org/genprot" + + "o/googleapis/cloud/aiplatform/v1beta1/sc" + + "hema/predict/instance;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", "TimeSegmentStart", "TimeSegmentEnd", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java new file mode 100644 index 000000000..ac89697f4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance} + */ +public final class VideoObjectTrackingPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + VideoObjectTrackingPredictionInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoObjectTrackingPredictionInstance.newBuilder() to construct. + private VideoObjectTrackingPredictionInstance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoObjectTrackingPredictionInstance() { + content_ = ""; + mimeType_ = ""; + timeSegmentStart_ = ""; + timeSegmentEnd_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoObjectTrackingPredictionInstance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoObjectTrackingPredictionInstance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentStart_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + 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 TIME_SEGMENT_START_FIELD_NUMBER = 3; + private volatile java.lang.Object timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + 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(); + timeSegmentStart_ = s; + return s; + } + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 4; + private volatile java.lang.Object timeSegmentEnd_; + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + 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(); + timeSegmentEnd_ = s; + return s; + } + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = 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 (!getTimeSegmentStartBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, timeSegmentEnd_); + } + 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 (!getTimeSegmentStartBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timeSegmentStart_); + } + if (!getTimeSegmentEndBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, timeSegmentEnd_); + } + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) 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) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + 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; + } + /** + * + * + *
+   * Prediction input format for Video Object Tracking.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance.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_ = ""; + + timeSegmentStart_ = ""; + + timeSegmentEnd_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + result.timeSegmentStart_ = timeSegmentStart_; + result.timeSegmentEnd_ = timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getTimeSegmentStart().isEmpty()) { + timeSegmentStart_ = other.timeSegmentStart_; + onChanged(); + } + if (!other.getTimeSegmentEnd().isEmpty()) { + timeSegmentEnd_ = other.timeSegmentEnd_; + 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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + 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; + } + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location of the video on which to perform the
+     * prediction.
+     * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + 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_ = ""; + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + 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; + } + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the content of the video. Only the following are
+     * supported: video/mp4 video/avi video/quicktime
+     * 
+ * + * string mime_type = 2; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + 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 timeSegmentStart_ = ""; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + public java.lang.String getTimeSegmentStart() { + java.lang.Object ref = timeSegmentStart_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentStart_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + public com.google.protobuf.ByteString getTimeSegmentStartBytes() { + java.lang.Object ref = timeSegmentStart_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentStart_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStart(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentStart_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentStart() { + + timeSegmentStart_ = getDefaultInstance().getTimeSegmentStart(); + onChanged(); + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision.
+     * 
+ * + * string time_segment_start = 3; + * + * @param value The bytes for timeSegmentStart to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentStartBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentStart_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeSegmentEnd_ = ""; + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + public java.lang.String getTimeSegmentEnd() { + java.lang.Object ref = timeSegmentEnd_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSegmentEnd_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + public com.google.protobuf.ByteString getTimeSegmentEndBytes() { + java.lang.Object ref = timeSegmentEnd_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSegmentEnd_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEnd(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSegmentEnd_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @return This builder for chaining. + */ + public Builder clearTimeSegmentEnd() { + + timeSegmentEnd_ = getDefaultInstance().getTimeSegmentEnd(); + onChanged(); + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment on which to perform
+     * the prediction. Expressed as a number of seconds as measured from the
+     * start of the video, with "s" appended at the end. Fractions are allowed,
+     * up to a microsecond precision, and "Infinity" is allowed, which means the
+     * end of the video.
+     * 
+ * + * string time_segment_end = 4; + * + * @param value The bytes for timeSegmentEnd to set. + * @return This builder for chaining. + */ + public Builder setTimeSegmentEndBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSegmentEnd_ = 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.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoObjectTrackingPredictionInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoObjectTrackingPredictionInstance(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.aiplatform.v1beta1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..2e29ef57f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public interface VideoObjectTrackingPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The Google Cloud Storage location of the video on which to perform the
+   * prediction.
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the content of the video. Only the following are
+   * supported: video/mp4 video/avi video/quicktime
+   * 
+ * + * string mime_type = 2; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + java.lang.String getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision.
+   * 
+ * + * string time_segment_start = 3; + * + * @return The bytes for timeSegmentStart. + */ + com.google.protobuf.ByteString getTimeSegmentStartBytes(); + + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + java.lang.String getTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment on which to perform
+   * the prediction. Expressed as a number of seconds as measured from the
+   * start of the video, with "s" appended at the end. Fractions are allowed,
+   * up to a microsecond precision, and "Infinity" is allowed, which means the
+   * end of the video.
+   * 
+ * + * string time_segment_end = 4; + * + * @return The bytes for timeSegmentEnd. + */ + com.google.protobuf.ByteString getTimeSegmentEndBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java new file mode 100644 index 000000000..5ca099a05 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.instance; + +public final class VideoObjectTrackingPredictionInstanceProto { + private VideoObjectTrackingPredictionInstanceProto() {} + + 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_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nSgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/instance/video_object_tracking." + + "proto\0227google.cloud.aiplatform.v1beta1.s" + + "chema.predict.instance\032\034google/api/annot" + + "ations.proto\"\201\001\n%VideoObjectTrackingPred" + + "ictionInstance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_" + + "type\030\002 \001(\t\022\032\n\022time_segment_start\030\003 \001(\t\022\030" + + "\n\020time_segment_end\030\004 \001(\tB\314\001\n;com.google." + + "cloud.aiplatform.v1beta1.schema.predict." + + "instanceB*VideoObjectTrackingPredictionI" + + "nstanceProtoP\001Z_google.golang.org/genpro" + + "to/googleapis/cloud/aiplatform/v1beta1/s" + + "chema/predict/instance;instanceb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor, + new java.lang.String[] { + "Content", "MimeType", "TimeSegmentStart", "TimeSegmentEnd", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParams.java new file mode 100644 index 000000000..4c288dc40 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParams.java @@ -0,0 +1,721 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams} + */ +public final class ImageClassificationPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams) + ImageClassificationPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageClassificationPredictionParams.newBuilder() to construct. + private ImageClassificationPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageClassificationPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageClassificationPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageClassificationPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + break; + } + case 16: + { + maxPredictions_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + public static final int MAX_PREDICTIONS_FIELD_NUMBER = 2; + private int maxPredictions_; + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. If this number is very high, the Model may return
+   * fewer predictions. Default value is 10.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + output.writeInt32(2, maxPredictions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxPredictions_); + } + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; + if (getMaxPredictions() != other.getMaxPredictions()) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (37 * hash) + MAX_PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxPredictions(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Image Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams.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(); + confidenceThreshold_ = 0F; + + maxPredictions_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + result.maxPredictions_ = maxPredictions_; + 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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + if (other.getMaxPredictions() != 0) { + setMaxPredictions(other.getMaxPredictions()); + } + 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.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + onChanged(); + return this; + } + + private int maxPredictions_; + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @param value The maxPredictions to set. + * @return This builder for chaining. + */ + public Builder setMaxPredictions(int value) { + + maxPredictions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxPredictions() { + + maxPredictions_ = 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.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageClassificationPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageClassificationPredictionParams(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.aiplatform.v1beta1.schema.predict.params + .ImageClassificationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..9dd361b1f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface ImageClassificationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); + + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. If this number is very high, the Model may return
+   * fewer predictions. Default value is 10.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + int getMaxPredictions(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsProto.java new file mode 100644 index 000000000..81c2c4311 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class ImageClassificationPredictionParamsProto { + private ImageClassificationPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nPgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/image_classification.pro" + + "to\0225google.cloud.aiplatform.v1beta1.sche" + + "ma.predict.params\032\034google/api/annotation" + + "s.proto\"\\\n#ImageClassificationPrediction" + + "Params\022\034\n\024confidence_threshold\030\001 \001(\002\022\027\n\017" + + "max_predictions\030\002 \001(\005B\304\001\n9com.google.clo" + + "ud.aiplatform.v1beta1.schema.predict.par" + + "amsB(ImageClassificationPredictionParams" + + "ProtoP\001Z[google.golang.org/genproto/goog" + + "leapis/cloud/aiplatform/v1beta1/schema/p" + + "redict/params;paramsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageClassificationPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", "MaxPredictions", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParams.java new file mode 100644 index 000000000..958e388b2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParams.java @@ -0,0 +1,721 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams} + */ +public final class ImageObjectDetectionPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams) + ImageObjectDetectionPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageObjectDetectionPredictionParams.newBuilder() to construct. + private ImageObjectDetectionPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageObjectDetectionPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageObjectDetectionPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageObjectDetectionPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + break; + } + case 16: + { + maxPredictions_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + public static final int MAX_PREDICTIONS_FIELD_NUMBER = 2; + private int maxPredictions_; + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. Note that number of returned predictions is also
+   * limited by metadata's predictionsLimit. Default value is 10.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + output.writeInt32(2, maxPredictions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxPredictions_); + } + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; + if (getMaxPredictions() != other.getMaxPredictions()) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (37 * hash) + MAX_PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxPredictions(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Image Object Detection.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams.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(); + confidenceThreshold_ = 0F; + + maxPredictions_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + result.maxPredictions_ = maxPredictions_; + 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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + if (other.getMaxPredictions() != 0) { + setMaxPredictions(other.getMaxPredictions()); + } + 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.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + onChanged(); + return this; + } + + private int maxPredictions_; + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. Note that number of returned predictions is also
+     * limited by metadata's predictionsLimit. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. Note that number of returned predictions is also
+     * limited by metadata's predictionsLimit. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @param value The maxPredictions to set. + * @return This builder for chaining. + */ + public Builder setMaxPredictions(int value) { + + maxPredictions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. Note that number of returned predictions is also
+     * limited by metadata's predictionsLimit. Default value is 10.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxPredictions() { + + maxPredictions_ = 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.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageObjectDetectionPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageObjectDetectionPredictionParams(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.aiplatform.v1beta1.schema.predict.params + .ImageObjectDetectionPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java new file mode 100644 index 000000000..c00cee93d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface ImageObjectDetectionPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); + + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. Note that number of returned predictions is also
+   * limited by metadata's predictionsLimit. Default value is 10.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + int getMaxPredictions(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java new file mode 100644 index 000000000..763eac81d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class ImageObjectDetectionPredictionParamsProto { + private ImageObjectDetectionPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nRgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/image_object_detection.p" + + "roto\0225google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.params\032\034google/api/annotati" + + "ons.proto\"]\n$ImageObjectDetectionPredict" + + "ionParams\022\034\n\024confidence_threshold\030\001 \001(\002\022" + + "\027\n\017max_predictions\030\002 \001(\005B\305\001\n9com.google." + + "cloud.aiplatform.v1beta1.schema.predict." + + "paramsB)ImageObjectDetectionPredictionPa" + + "ramsProtoP\001Z[google.golang.org/genproto/" + + "googleapis/cloud/aiplatform/v1beta1/sche" + + "ma/predict/params;paramsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", "MaxPredictions", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParams.java new file mode 100644 index 000000000..3b4c22603 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParams.java @@ -0,0 +1,628 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams} + */ +public final class ImageSegmentationPredictionParams extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams) + ImageSegmentationPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageSegmentationPredictionParams.newBuilder() to construct. + private ImageSegmentationPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageSegmentationPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageSegmentationPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageSegmentationPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * When the model predicts category of pixels of the image, it will only
+   * provide predictions for pixels that it is at least this much confident
+   * about. All other pixels will be classified as background. Default value is
+   * 0.5.
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Image Segmentation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams.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(); + confidenceThreshold_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + 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.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + 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.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * When the model predicts category of pixels of the image, it will only
+     * provide predictions for pixels that it is at least this much confident
+     * about. All other pixels will be classified as background. Default value is
+     * 0.5.
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * When the model predicts category of pixels of the image, it will only
+     * provide predictions for pixels that it is at least this much confident
+     * about. All other pixels will be classified as background. Default value is
+     * 0.5.
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When the model predicts category of pixels of the image, it will only
+     * provide predictions for pixels that it is at least this much confident
+     * about. All other pixels will be classified as background. Default value is
+     * 0.5.
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + 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.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .ImageSegmentationPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSegmentationPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSegmentationPredictionParams(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.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..92cba179c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface ImageSegmentationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.ImageSegmentationPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * When the model predicts category of pixels of the image, it will only
+   * provide predictions for pixels that it is at least this much confident
+   * about. All other pixels will be classified as background. Default value is
+   * 0.5.
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsProto.java new file mode 100644 index 000000000..429643682 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsProto.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class ImageSegmentationPredictionParamsProto { + private ImageSegmentationPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nNgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/image_segmentation.proto" + + "\0225google.cloud.aiplatform.v1beta1.schema" + + ".predict.params\032\034google/api/annotations." + + "proto\"A\n!ImageSegmentationPredictionPara" + + "ms\022\034\n\024confidence_threshold\030\001 \001(\002B\302\001\n9com" + + ".google.cloud.aiplatform.v1beta1.schema." + + "predict.paramsB&ImageSegmentationPredict" + + "ionParamsProtoP\001Z[google.golang.org/genp" + + "roto/googleapis/cloud/aiplatform/v1beta1" + + "/schema/predict/params;paramsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_ImageSegmentationPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParams.java new file mode 100644 index 000000000..fc93e35d0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParams.java @@ -0,0 +1,725 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams} + */ +public final class VideoActionRecognitionPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams) + VideoActionRecognitionPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoActionRecognitionPredictionParams.newBuilder() to construct. + private VideoActionRecognitionPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoActionRecognitionPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoActionRecognitionPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoActionRecognitionPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + break; + } + case 16: + { + maxPredictions_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + public static final int MAX_PREDICTIONS_FIELD_NUMBER = 2; + private int maxPredictions_; + /** + * + * + *
+   * The model only returns up to that many top, by confidence score,
+   * predictions per frame of the video. If this number is very high, the
+   * Model may return fewer predictions per frame. Default value is 50.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + output.writeInt32(2, maxPredictions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxPredictions_); + } + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; + if (getMaxPredictions() != other.getMaxPredictions()) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (37 * hash) + MAX_PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxPredictions(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Video Action Recognition.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams.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(); + confidenceThreshold_ = 0F; + + maxPredictions_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + result.maxPredictions_ = maxPredictions_; + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + if (other.getMaxPredictions() != 0) { + setMaxPredictions(other.getMaxPredictions()); + } + 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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + onChanged(); + return this; + } + + private int maxPredictions_; + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @param value The maxPredictions to set. + * @return This builder for chaining. + */ + public Builder setMaxPredictions(int value) { + + maxPredictions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxPredictions() { + + maxPredictions_ = 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.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoActionRecognitionPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoActionRecognitionPredictionParams(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.aiplatform.v1beta1.schema.predict.params + .VideoActionRecognitionPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java new file mode 100644 index 000000000..3f7cc38d8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface VideoActionRecognitionPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoActionRecognitionPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); + + /** + * + * + *
+   * The model only returns up to that many top, by confidence score,
+   * predictions per frame of the video. If this number is very high, the
+   * Model may return fewer predictions per frame. Default value is 50.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + int getMaxPredictions(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java new file mode 100644 index 000000000..af7fe4c6a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class VideoActionRecognitionPredictionParamsProto { + private VideoActionRecognitionPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nTgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/video_action_recognition" + + ".proto\0225google.cloud.aiplatform.v1beta1." + + "schema.predict.params\032\034google/api/annota" + + "tions.proto\"_\n&VideoActionRecognitionPre" + + "dictionParams\022\034\n\024confidence_threshold\030\001 " + + "\001(\002\022\027\n\017max_predictions\030\002 \001(\005B\307\001\n9com.goo" + + "gle.cloud.aiplatform.v1beta1.schema.pred" + + "ict.paramsB+VideoActionRecognitionPredic" + + "tionParamsProtoP\001Z[google.golang.org/gen" + + "proto/googleapis/cloud/aiplatform/v1beta" + + "1/schema/predict/params;paramsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", "MaxPredictions", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParams.java new file mode 100644 index 000000000..c6406d4f4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParams.java @@ -0,0 +1,1057 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams} + */ +public final class VideoClassificationPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams) + VideoClassificationPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoClassificationPredictionParams.newBuilder() to construct. + private VideoClassificationPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoClassificationPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoClassificationPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoClassificationPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + break; + } + case 16: + { + maxPredictions_ = input.readInt32(); + break; + } + case 24: + { + segmentClassification_ = input.readBool(); + break; + } + case 32: + { + shotClassification_ = input.readBool(); + break; + } + case 40: + { + oneSecIntervalClassification_ = input.readBool(); + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + public static final int MAX_PREDICTIONS_FIELD_NUMBER = 2; + private int maxPredictions_; + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. If this number is very high, the Model may return
+   * fewer predictions. Default value is 10,000.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + + public static final int SEGMENT_CLASSIFICATION_FIELD_NUMBER = 3; + private boolean segmentClassification_; + /** + * + * + *
+   * Set to true to request segment-level classification. AI Platform returns
+   * labels and their confidence scores for the entire time segment of the
+   * video that user specified in the input instance.
+   * Default value is true
+   * 
+ * + * bool segment_classification = 3; + * + * @return The segmentClassification. + */ + @java.lang.Override + public boolean getSegmentClassification() { + return segmentClassification_; + } + + public static final int SHOT_CLASSIFICATION_FIELD_NUMBER = 4; + private boolean shotClassification_; + /** + * + * + *
+   * Set to true to request shot-level classification. AI Platform determines
+   * the boundaries for each camera shot in the entire time segment of the
+   * video that user specified in the input instance. AI Platform then
+   * returns labels and their confidence scores for each detected shot, along
+   * with the start and end time of the shot.
+   * WARNING: Model evaluation is not done for this classification type,
+   * the quality of it depends on the training data, but there are no metrics
+   * provided to describe that quality.
+   * Default value is false
+   * 
+ * + * bool shot_classification = 4; + * + * @return The shotClassification. + */ + @java.lang.Override + public boolean getShotClassification() { + return shotClassification_; + } + + public static final int ONE_SEC_INTERVAL_CLASSIFICATION_FIELD_NUMBER = 5; + private boolean oneSecIntervalClassification_; + /** + * + * + *
+   * Set to true to request classification for a video at one-second intervals.
+   * AI Platform returns labels and their confidence scores for each second of
+   * the entire time segment of the video that user specified in the input
+   * WARNING: Model evaluation is not done for this classification type, the
+   * quality of it depends on the training data, but there are no metrics
+   * provided to describe that quality. Default value is false
+   * 
+ * + * bool one_sec_interval_classification = 5; + * + * @return The oneSecIntervalClassification. + */ + @java.lang.Override + public boolean getOneSecIntervalClassification() { + return oneSecIntervalClassification_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + output.writeInt32(2, maxPredictions_); + } + if (segmentClassification_ != false) { + output.writeBool(3, segmentClassification_); + } + if (shotClassification_ != false) { + output.writeBool(4, shotClassification_); + } + if (oneSecIntervalClassification_ != false) { + output.writeBool(5, oneSecIntervalClassification_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxPredictions_); + } + if (segmentClassification_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, segmentClassification_); + } + if (shotClassification_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, shotClassification_); + } + if (oneSecIntervalClassification_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, oneSecIntervalClassification_); + } + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; + if (getMaxPredictions() != other.getMaxPredictions()) return false; + if (getSegmentClassification() != other.getSegmentClassification()) return false; + if (getShotClassification() != other.getShotClassification()) return false; + if (getOneSecIntervalClassification() != other.getOneSecIntervalClassification()) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (37 * hash) + MAX_PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxPredictions(); + hash = (37 * hash) + SEGMENT_CLASSIFICATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSegmentClassification()); + hash = (37 * hash) + SHOT_CLASSIFICATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShotClassification()); + hash = (37 * hash) + ONE_SEC_INTERVAL_CLASSIFICATION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOneSecIntervalClassification()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + 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.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Video Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams.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(); + confidenceThreshold_ = 0F; + + maxPredictions_ = 0; + + segmentClassification_ = false; + + shotClassification_ = false; + + oneSecIntervalClassification_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + result.maxPredictions_ = maxPredictions_; + result.segmentClassification_ = segmentClassification_; + result.shotClassification_ = shotClassification_; + result.oneSecIntervalClassification_ = oneSecIntervalClassification_; + 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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + if (other.getMaxPredictions() != 0) { + setMaxPredictions(other.getMaxPredictions()); + } + if (other.getSegmentClassification() != false) { + setSegmentClassification(other.getSegmentClassification()); + } + if (other.getShotClassification() != false) { + setShotClassification(other.getShotClassification()); + } + if (other.getOneSecIntervalClassification() != false) { + setOneSecIntervalClassification(other.getOneSecIntervalClassification()); + } + 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.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + onChanged(); + return this; + } + + private int maxPredictions_; + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10,000.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10,000.
+     * 
+ * + * int32 max_predictions = 2; + * + * @param value The maxPredictions to set. + * @return This builder for chaining. + */ + public Builder setMaxPredictions(int value) { + + maxPredictions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns up to that many top, by confidence score,
+     * predictions per instance. If this number is very high, the Model may return
+     * fewer predictions. Default value is 10,000.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxPredictions() { + + maxPredictions_ = 0; + onChanged(); + return this; + } + + private boolean segmentClassification_; + /** + * + * + *
+     * Set to true to request segment-level classification. AI Platform returns
+     * labels and their confidence scores for the entire time segment of the
+     * video that user specified in the input instance.
+     * Default value is true
+     * 
+ * + * bool segment_classification = 3; + * + * @return The segmentClassification. + */ + @java.lang.Override + public boolean getSegmentClassification() { + return segmentClassification_; + } + /** + * + * + *
+     * Set to true to request segment-level classification. AI Platform returns
+     * labels and their confidence scores for the entire time segment of the
+     * video that user specified in the input instance.
+     * Default value is true
+     * 
+ * + * bool segment_classification = 3; + * + * @param value The segmentClassification to set. + * @return This builder for chaining. + */ + public Builder setSegmentClassification(boolean value) { + + segmentClassification_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to true to request segment-level classification. AI Platform returns
+     * labels and their confidence scores for the entire time segment of the
+     * video that user specified in the input instance.
+     * Default value is true
+     * 
+ * + * bool segment_classification = 3; + * + * @return This builder for chaining. + */ + public Builder clearSegmentClassification() { + + segmentClassification_ = false; + onChanged(); + return this; + } + + private boolean shotClassification_; + /** + * + * + *
+     * Set to true to request shot-level classification. AI Platform determines
+     * the boundaries for each camera shot in the entire time segment of the
+     * video that user specified in the input instance. AI Platform then
+     * returns labels and their confidence scores for each detected shot, along
+     * with the start and end time of the shot.
+     * WARNING: Model evaluation is not done for this classification type,
+     * the quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality.
+     * Default value is false
+     * 
+ * + * bool shot_classification = 4; + * + * @return The shotClassification. + */ + @java.lang.Override + public boolean getShotClassification() { + return shotClassification_; + } + /** + * + * + *
+     * Set to true to request shot-level classification. AI Platform determines
+     * the boundaries for each camera shot in the entire time segment of the
+     * video that user specified in the input instance. AI Platform then
+     * returns labels and their confidence scores for each detected shot, along
+     * with the start and end time of the shot.
+     * WARNING: Model evaluation is not done for this classification type,
+     * the quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality.
+     * Default value is false
+     * 
+ * + * bool shot_classification = 4; + * + * @param value The shotClassification to set. + * @return This builder for chaining. + */ + public Builder setShotClassification(boolean value) { + + shotClassification_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to true to request shot-level classification. AI Platform determines
+     * the boundaries for each camera shot in the entire time segment of the
+     * video that user specified in the input instance. AI Platform then
+     * returns labels and their confidence scores for each detected shot, along
+     * with the start and end time of the shot.
+     * WARNING: Model evaluation is not done for this classification type,
+     * the quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality.
+     * Default value is false
+     * 
+ * + * bool shot_classification = 4; + * + * @return This builder for chaining. + */ + public Builder clearShotClassification() { + + shotClassification_ = false; + onChanged(); + return this; + } + + private boolean oneSecIntervalClassification_; + /** + * + * + *
+     * Set to true to request classification for a video at one-second intervals.
+     * AI Platform returns labels and their confidence scores for each second of
+     * the entire time segment of the video that user specified in the input
+     * WARNING: Model evaluation is not done for this classification type, the
+     * quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality. Default value is false
+     * 
+ * + * bool one_sec_interval_classification = 5; + * + * @return The oneSecIntervalClassification. + */ + @java.lang.Override + public boolean getOneSecIntervalClassification() { + return oneSecIntervalClassification_; + } + /** + * + * + *
+     * Set to true to request classification for a video at one-second intervals.
+     * AI Platform returns labels and their confidence scores for each second of
+     * the entire time segment of the video that user specified in the input
+     * WARNING: Model evaluation is not done for this classification type, the
+     * quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality. Default value is false
+     * 
+ * + * bool one_sec_interval_classification = 5; + * + * @param value The oneSecIntervalClassification to set. + * @return This builder for chaining. + */ + public Builder setOneSecIntervalClassification(boolean value) { + + oneSecIntervalClassification_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to true to request classification for a video at one-second intervals.
+     * AI Platform returns labels and their confidence scores for each second of
+     * the entire time segment of the video that user specified in the input
+     * WARNING: Model evaluation is not done for this classification type, the
+     * quality of it depends on the training data, but there are no metrics
+     * provided to describe that quality. Default value is false
+     * 
+ * + * bool one_sec_interval_classification = 5; + * + * @return This builder for chaining. + */ + public Builder clearOneSecIntervalClassification() { + + oneSecIntervalClassification_ = false; + 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.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoClassificationPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoClassificationPredictionParams(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.aiplatform.v1beta1.schema.predict.params + .VideoClassificationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..50cad0d10 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface VideoClassificationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoClassificationPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); + + /** + * + * + *
+   * The Model only returns up to that many top, by confidence score,
+   * predictions per instance. If this number is very high, the Model may return
+   * fewer predictions. Default value is 10,000.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + int getMaxPredictions(); + + /** + * + * + *
+   * Set to true to request segment-level classification. AI Platform returns
+   * labels and their confidence scores for the entire time segment of the
+   * video that user specified in the input instance.
+   * Default value is true
+   * 
+ * + * bool segment_classification = 3; + * + * @return The segmentClassification. + */ + boolean getSegmentClassification(); + + /** + * + * + *
+   * Set to true to request shot-level classification. AI Platform determines
+   * the boundaries for each camera shot in the entire time segment of the
+   * video that user specified in the input instance. AI Platform then
+   * returns labels and their confidence scores for each detected shot, along
+   * with the start and end time of the shot.
+   * WARNING: Model evaluation is not done for this classification type,
+   * the quality of it depends on the training data, but there are no metrics
+   * provided to describe that quality.
+   * Default value is false
+   * 
+ * + * bool shot_classification = 4; + * + * @return The shotClassification. + */ + boolean getShotClassification(); + + /** + * + * + *
+   * Set to true to request classification for a video at one-second intervals.
+   * AI Platform returns labels and their confidence scores for each second of
+   * the entire time segment of the video that user specified in the input
+   * WARNING: Model evaluation is not done for this classification type, the
+   * quality of it depends on the training data, but there are no metrics
+   * provided to describe that quality. Default value is false
+   * 
+ * + * bool one_sec_interval_classification = 5; + * + * @return The oneSecIntervalClassification. + */ + boolean getOneSecIntervalClassification(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsProto.java new file mode 100644 index 000000000..fde0c01cc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsProto.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class VideoClassificationPredictionParamsProto { + private VideoClassificationPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nPgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/video_classification.pro" + + "to\0225google.cloud.aiplatform.v1beta1.sche" + + "ma.predict.params\032\034google/api/annotation" + + "s.proto\"\302\001\n#VideoClassificationPredictio" + + "nParams\022\034\n\024confidence_threshold\030\001 \001(\002\022\027\n" + + "\017max_predictions\030\002 \001(\005\022\036\n\026segment_classi" + + "fication\030\003 \001(\010\022\033\n\023shot_classification\030\004 " + + "\001(\010\022\'\n\037one_sec_interval_classification\030\005" + + " \001(\010B\304\001\n9com.google.cloud.aiplatform.v1b" + + "eta1.schema.predict.paramsB(VideoClassif" + + "icationPredictionParamsProtoP\001Z[google.g" + + "olang.org/genproto/googleapis/cloud/aipl" + + "atform/v1beta1/schema/predict/params;par" + + "amsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoClassificationPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", + "MaxPredictions", + "SegmentClassification", + "ShotClassification", + "OneSecIntervalClassification", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParams.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParams.java new file mode 100644 index 000000000..45fcc925c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParams.java @@ -0,0 +1,816 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams} + */ +public final class VideoObjectTrackingPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams) + VideoObjectTrackingPredictionParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoObjectTrackingPredictionParams.newBuilder() to construct. + private VideoObjectTrackingPredictionParams( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoObjectTrackingPredictionParams() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoObjectTrackingPredictionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoObjectTrackingPredictionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceThreshold_ = input.readFloat(); + break; + } + case 16: + { + maxPredictions_ = input.readInt32(); + break; + } + case 29: + { + minBoundingBoxSize_ = input.readFloat(); + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.Builder.class); + } + + public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; + private float confidenceThreshold_; + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + + public static final int MAX_PREDICTIONS_FIELD_NUMBER = 2; + private int maxPredictions_; + /** + * + * + *
+   * The model only returns up to that many top, by confidence score,
+   * predictions per frame of the video. If this number is very high, the
+   * Model may return fewer predictions per frame. Default value is 50.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + + public static final int MIN_BOUNDING_BOX_SIZE_FIELD_NUMBER = 3; + private float minBoundingBoxSize_; + /** + * + * + *
+   * Only bounding boxes with shortest edge at least that long as a relative
+   * value of video frame size are returned. Default value is 0.0.
+   * 
+ * + * float min_bounding_box_size = 3; + * + * @return The minBoundingBoxSize. + */ + @java.lang.Override + public float getMinBoundingBoxSize() { + return minBoundingBoxSize_; + } + + 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 (confidenceThreshold_ != 0F) { + output.writeFloat(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + output.writeInt32(2, maxPredictions_); + } + if (minBoundingBoxSize_ != 0F) { + output.writeFloat(3, minBoundingBoxSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceThreshold_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceThreshold_); + } + if (maxPredictions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxPredictions_); + } + if (minBoundingBoxSize_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, minBoundingBoxSize_); + } + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams) + obj; + + if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; + if (getMaxPredictions() != other.getMaxPredictions()) return false; + if (java.lang.Float.floatToIntBits(getMinBoundingBoxSize()) + != java.lang.Float.floatToIntBits(other.getMinBoundingBoxSize())) 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) + CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceThreshold()); + hash = (37 * hash) + MAX_PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxPredictions(); + hash = (37 * hash) + MIN_BOUNDING_BOX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMinBoundingBoxSize()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + 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.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams + 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; + } + /** + * + * + *
+   * Prediction model parameters for Video Object Tracking.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams) + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams.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(); + confidenceThreshold_ = 0F; + + maxPredictions_ = 0; + + minBoundingBoxSize_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams(this); + result.confidenceThreshold_ = confidenceThreshold_; + result.maxPredictions_ = maxPredictions_; + result.minBoundingBoxSize_ = minBoundingBoxSize_; + 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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams.getDefaultInstance()) return this; + if (other.getConfidenceThreshold() != 0F) { + setConfidenceThreshold(other.getConfidenceThreshold()); + } + if (other.getMaxPredictions() != 0) { + setMaxPredictions(other.getMaxPredictions()); + } + if (other.getMinBoundingBoxSize() != 0F) { + setMinBoundingBoxSize(other.getMinBoundingBoxSize()); + } + 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.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float confidenceThreshold_; + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + @java.lang.Override + public float getConfidenceThreshold() { + return confidenceThreshold_; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @param value The confidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setConfidenceThreshold(float value) { + + confidenceThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model only returns predictions with at least this confidence score.
+     * Default value is 0.0
+     * 
+ * + * float confidence_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceThreshold() { + + confidenceThreshold_ = 0F; + onChanged(); + return this; + } + + private int maxPredictions_; + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + @java.lang.Override + public int getMaxPredictions() { + return maxPredictions_; + } + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @param value The maxPredictions to set. + * @return This builder for chaining. + */ + public Builder setMaxPredictions(int value) { + + maxPredictions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The model only returns up to that many top, by confidence score,
+     * predictions per frame of the video. If this number is very high, the
+     * Model may return fewer predictions per frame. Default value is 50.
+     * 
+ * + * int32 max_predictions = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxPredictions() { + + maxPredictions_ = 0; + onChanged(); + return this; + } + + private float minBoundingBoxSize_; + /** + * + * + *
+     * Only bounding boxes with shortest edge at least that long as a relative
+     * value of video frame size are returned. Default value is 0.0.
+     * 
+ * + * float min_bounding_box_size = 3; + * + * @return The minBoundingBoxSize. + */ + @java.lang.Override + public float getMinBoundingBoxSize() { + return minBoundingBoxSize_; + } + /** + * + * + *
+     * Only bounding boxes with shortest edge at least that long as a relative
+     * value of video frame size are returned. Default value is 0.0.
+     * 
+ * + * float min_bounding_box_size = 3; + * + * @param value The minBoundingBoxSize to set. + * @return This builder for chaining. + */ + public Builder setMinBoundingBoxSize(float value) { + + minBoundingBoxSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Only bounding boxes with shortest edge at least that long as a relative
+     * value of video frame size are returned. Default value is 0.0.
+     * 
+ * + * float min_bounding_box_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearMinBoundingBoxSize() { + + minBoundingBoxSize_ = 0F; + 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.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoObjectTrackingPredictionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoObjectTrackingPredictionParams(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.aiplatform.v1beta1.schema.predict.params + .VideoObjectTrackingPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java new file mode 100644 index 000000000..adddd6c23 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public interface VideoObjectTrackingPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.params.VideoObjectTrackingPredictionParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Model only returns predictions with at least this confidence score.
+   * Default value is 0.0
+   * 
+ * + * float confidence_threshold = 1; + * + * @return The confidenceThreshold. + */ + float getConfidenceThreshold(); + + /** + * + * + *
+   * The model only returns up to that many top, by confidence score,
+   * predictions per frame of the video. If this number is very high, the
+   * Model may return fewer predictions per frame. Default value is 50.
+   * 
+ * + * int32 max_predictions = 2; + * + * @return The maxPredictions. + */ + int getMaxPredictions(); + + /** + * + * + *
+   * Only bounding boxes with shortest edge at least that long as a relative
+   * value of video frame size are returned. Default value is 0.0.
+   * 
+ * + * float min_bounding_box_size = 3; + * + * @return The minBoundingBoxSize. + */ + float getMinBoundingBoxSize(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java new file mode 100644 index 000000000..49e30d72f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.params; + +public final class VideoObjectTrackingPredictionParamsProto { + private VideoObjectTrackingPredictionParamsProto() {} + + 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_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nQgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/params/video_object_tracking.pr" + + "oto\0225google.cloud.aiplatform.v1beta1.sch" + + "ema.predict.params\032\034google/api/annotatio" + + "ns.proto\"{\n#VideoObjectTrackingPredictio" + + "nParams\022\034\n\024confidence_threshold\030\001 \001(\002\022\027\n" + + "\017max_predictions\030\002 \001(\005\022\035\n\025min_bounding_b" + + "ox_size\030\003 \001(\002B\304\001\n9com.google.cloud.aipla" + + "tform.v1beta1.schema.predict.paramsB(Vid" + + "eoObjectTrackingPredictionParamsProtoP\001Z" + + "[google.golang.org/genproto/googleapis/c" + + "loud/aiplatform/v1beta1/schema/predict/p" + + "arams;paramsb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor, + new java.lang.String[] { + "ConfidenceThreshold", "MaxPredictions", "MinBoundingBoxSize", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResult.java new file mode 100644 index 000000000..d215fb3b5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResult.java @@ -0,0 +1,1323 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image and Text Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult} + */ +public final class ClassificationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult) + ClassificationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClassificationPredictionResult.newBuilder() to construct. + private ClassificationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClassificationPredictionResult() { + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + confidences_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClassificationPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ClassificationPredictionResult( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.addLong(input.readInt64()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + ids_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + displayNames_.add(s); + break; + } + case 29: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + confidences_.addFloat(input.readFloat()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + confidences_.addFloat(input.readFloat()); + } + input.popLimit(limit); + 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)) { + ids_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList ids_; + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + @java.lang.Override + public java.util.List getIdsList() { + return ids_; + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + + private int idsMemoizedSerializedSize = -1; + + public static final int DISPLAY_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList displayNames_; + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_; + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + + public static final int CONFIDENCES_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.FloatList confidences_; + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + @java.lang.Override + public java.util.List getConfidencesList() { + return confidences_; + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + + private int confidencesMemoizedSerializedSize = -1; + + 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 { + getSerializedSize(); + if (getIdsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(idsMemoizedSerializedSize); + } + for (int i = 0; i < ids_.size(); i++) { + output.writeInt64NoTag(ids_.getLong(i)); + } + for (int i = 0; i < displayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayNames_.getRaw(i)); + } + if (getConfidencesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(confidencesMemoizedSerializedSize); + } + for (int i = 0; i < confidences_.size(); i++) { + output.writeFloatNoTag(confidences_.getFloat(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 < ids_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(ids_.getLong(i)); + } + size += dataSize; + if (!getIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + idsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < displayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(displayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDisplayNamesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getConfidencesList().size(); + size += dataSize; + if (!getConfidencesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + confidencesMemoizedSerializedSize = dataSize; + } + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult) + obj; + + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getDisplayNamesList().equals(other.getDisplayNamesList())) return false; + if (!getConfidencesList().equals(other.getConfidencesList())) 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 (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getDisplayNamesCount() > 0) { + hash = (37 * hash) + DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDisplayNamesList().hashCode(); + } + if (getConfidencesCount() > 0) { + hash = (37 * hash) + CONFIDENCES_FIELD_NUMBER; + hash = (53 * hash) + getConfidencesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Image and Text Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult.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(); + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ids_ = ids_; + if (((bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.displayNames_ = displayNames_; + if (((bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.confidences_ = confidences_; + 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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.displayNames_.isEmpty()) { + if (displayNames_.isEmpty()) { + displayNames_ = other.displayNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDisplayNamesIsMutable(); + displayNames_.addAll(other.displayNames_); + } + onChanged(); + } + if (!other.confidences_.isEmpty()) { + if (confidences_.isEmpty()) { + confidences_ = other.confidences_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureConfidencesIsMutable(); + confidences_.addAll(other.confidences_); + } + 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.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + + private void ensureIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ids_ = mutableCopy(ids_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + public java.util.List getIdsList() { + return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(ids_) : ids_; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, long value) { + ensureIdsIsMutable(); + ids_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(long value) { + ensureIdsIsMutable(); + ids_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList displayNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDisplayNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(displayNames_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index to set the value at. + * @param value The displayNames to set. + * @return This builder for chaining. + */ + public Builder setDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param values The displayNames to add. + * @return This builder for chaining. + */ + public Builder addAllDisplayNames(java.lang.Iterable values) { + ensureDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayNames() { + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The bytes of the displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + + private void ensureConfidencesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + confidences_ = mutableCopy(confidences_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + public java.util.List getConfidencesList() { + return ((bitField0_ & 0x00000004) != 0) + ? java.util.Collections.unmodifiableList(confidences_) + : confidences_; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index to set the value at. + * @param value The confidences to set. + * @return This builder for chaining. + */ + public Builder setConfidences(int index, float value) { + ensureConfidencesIsMutable(); + confidences_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param value The confidences to add. + * @return This builder for chaining. + */ + public Builder addConfidences(float value) { + ensureConfidencesIsMutable(); + confidences_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param values The confidences to add. + * @return This builder for chaining. + */ + public Builder addAllConfidences(java.lang.Iterable values) { + ensureConfidencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidences_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidences() { + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + 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.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClassificationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClassificationPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .ClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..6d3f2361e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface ClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + long getIds(int index); + + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + java.util.List getDisplayNamesList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + int getDisplayNamesCount(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + java.lang.String getDisplayNames(int index); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + com.google.protobuf.ByteString getDisplayNamesBytes(int index); + + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + java.util.List getConfidencesList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + int getConfidencesCount(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + float getConfidences(int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultProto.java new file mode 100644 index 000000000..1785dd0d1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class ClassificationPredictionResultProto { + private ClassificationPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nNgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/classification.proto" + + "\0229google.cloud.aiplatform.v1beta1.schema" + + ".predict.prediction\032\034google/api/annotati" + + "ons.proto\"Y\n\036ClassificationPredictionRes" + + "ult\022\013\n\003ids\030\001 \003(\003\022\025\n\rdisplay_names\030\002 \003(\t\022" + + "\023\n\013confidences\030\003 \003(\002B\313\001\n=com.google.clou" + + "d.aiplatform.v1beta1.schema.predict.pred" + + "ictionB#ClassificationPredictionResultPr" + + "otoP\001Zcgoogle.golang.org/genproto/google" + + "apis/cloud/aiplatform/v1beta1/schema/pre" + + "dict/prediction;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ClassificationPredictionResult_descriptor, + new java.lang.String[] { + "Ids", "DisplayNames", "Confidences", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java new file mode 100644 index 000000000..e36b0f5b6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java @@ -0,0 +1,1927 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult} + */ +public final class ImageObjectDetectionPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + ImageObjectDetectionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageObjectDetectionPredictionResult.newBuilder() to construct. + private ImageObjectDetectionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageObjectDetectionPredictionResult() { + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + confidences_ = emptyFloatList(); + bboxes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageObjectDetectionPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageObjectDetectionPredictionResult( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.addLong(input.readInt64()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + ids_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + displayNames_.add(s); + break; + } + case 29: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + confidences_.addFloat(input.readFloat()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + confidences_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + bboxes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + bboxes_.add( + input.readMessage(com.google.protobuf.ListValue.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + bboxes_ = java.util.Collections.unmodifiableList(bboxes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList ids_; + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + @java.lang.Override + public java.util.List getIdsList() { + return ids_; + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + + private int idsMemoizedSerializedSize = -1; + + public static final int DISPLAY_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList displayNames_; + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_; + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + + public static final int CONFIDENCES_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.FloatList confidences_; + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + @java.lang.Override + public java.util.List getConfidencesList() { + return confidences_; + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + + private int confidencesMemoizedSerializedSize = -1; + + public static final int BBOXES_FIELD_NUMBER = 4; + private java.util.List bboxes_; + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public java.util.List getBboxesList() { + return bboxes_; + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public java.util.List getBboxesOrBuilderList() { + return bboxes_; + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public int getBboxesCount() { + return bboxes_.size(); + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public com.google.protobuf.ListValue getBboxes(int index) { + return bboxes_.get(index); + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index) { + return bboxes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getIdsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(idsMemoizedSerializedSize); + } + for (int i = 0; i < ids_.size(); i++) { + output.writeInt64NoTag(ids_.getLong(i)); + } + for (int i = 0; i < displayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayNames_.getRaw(i)); + } + if (getConfidencesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(confidencesMemoizedSerializedSize); + } + for (int i = 0; i < confidences_.size(); i++) { + output.writeFloatNoTag(confidences_.getFloat(i)); + } + for (int i = 0; i < bboxes_.size(); i++) { + output.writeMessage(4, bboxes_.get(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 < ids_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(ids_.getLong(i)); + } + size += dataSize; + if (!getIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + idsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < displayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(displayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDisplayNamesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getConfidencesList().size(); + size += dataSize; + if (!getConfidencesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + confidencesMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < bboxes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, bboxes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) + obj; + + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getDisplayNamesList().equals(other.getDisplayNamesList())) return false; + if (!getConfidencesList().equals(other.getConfidencesList())) return false; + if (!getBboxesList().equals(other.getBboxesList())) 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 (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getDisplayNamesCount() > 0) { + hash = (37 * hash) + DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDisplayNamesList().hashCode(); + } + if (getConfidencesCount() > 0) { + hash = (37 * hash) + CONFIDENCES_FIELD_NUMBER; + hash = (53 * hash) + getConfidencesList().hashCode(); + } + if (getBboxesCount() > 0) { + hash = (37 * hash) + BBOXES_FIELD_NUMBER; + hash = (53 * hash) + getBboxesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Image Object Detection.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBboxesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + if (bboxesBuilder_ == null) { + bboxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + bboxesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ids_ = ids_; + if (((bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.displayNames_ = displayNames_; + if (((bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.confidences_ = confidences_; + if (bboxesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + bboxes_ = java.util.Collections.unmodifiableList(bboxes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.bboxes_ = bboxes_; + } else { + result.bboxes_ = bboxesBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.displayNames_.isEmpty()) { + if (displayNames_.isEmpty()) { + displayNames_ = other.displayNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDisplayNamesIsMutable(); + displayNames_.addAll(other.displayNames_); + } + onChanged(); + } + if (!other.confidences_.isEmpty()) { + if (confidences_.isEmpty()) { + confidences_ = other.confidences_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureConfidencesIsMutable(); + confidences_.addAll(other.confidences_); + } + onChanged(); + } + if (bboxesBuilder_ == null) { + if (!other.bboxes_.isEmpty()) { + if (bboxes_.isEmpty()) { + bboxes_ = other.bboxes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBboxesIsMutable(); + bboxes_.addAll(other.bboxes_); + } + onChanged(); + } + } else { + if (!other.bboxes_.isEmpty()) { + if (bboxesBuilder_.isEmpty()) { + bboxesBuilder_.dispose(); + bboxesBuilder_ = null; + bboxes_ = other.bboxes_; + bitField0_ = (bitField0_ & ~0x00000008); + bboxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBboxesFieldBuilder() + : null; + } else { + bboxesBuilder_.addAllMessages(other.bboxes_); + } + } + } + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + + private void ensureIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ids_ = mutableCopy(ids_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + public java.util.List getIdsList() { + return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(ids_) : ids_; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, long value) { + ensureIdsIsMutable(); + ids_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(long value) { + ensureIdsIsMutable(); + ids_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList displayNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDisplayNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(displayNames_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index to set the value at. + * @param value The displayNames to set. + * @return This builder for chaining. + */ + public Builder setDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param values The displayNames to add. + * @return This builder for chaining. + */ + public Builder addAllDisplayNames(java.lang.Iterable values) { + ensureDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayNames() { + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The bytes of the displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + + private void ensureConfidencesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + confidences_ = mutableCopy(confidences_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + public java.util.List getConfidencesList() { + return ((bitField0_ & 0x00000004) != 0) + ? java.util.Collections.unmodifiableList(confidences_) + : confidences_; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index to set the value at. + * @param value The confidences to set. + * @return This builder for chaining. + */ + public Builder setConfidences(int index, float value) { + ensureConfidencesIsMutable(); + confidences_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param value The confidences to add. + * @return This builder for chaining. + */ + public Builder addConfidences(float value) { + ensureConfidencesIsMutable(); + confidences_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param values The confidences to add. + * @return This builder for chaining. + */ + public Builder addAllConfidences(java.lang.Iterable values) { + ensureConfidencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidences_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidences() { + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private java.util.List bboxes_ = + java.util.Collections.emptyList(); + + private void ensureBboxesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + bboxes_ = new java.util.ArrayList(bboxes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + bboxesBuilder_; + + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List getBboxesList() { + if (bboxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bboxes_); + } else { + return bboxesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public int getBboxesCount() { + if (bboxesBuilder_ == null) { + return bboxes_.size(); + } else { + return bboxesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue getBboxes(int index) { + if (bboxesBuilder_ == null) { + return bboxes_.get(index); + } else { + return bboxesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder setBboxes(int index, com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.set(index, value); + onChanged(); + } else { + bboxesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder setBboxes(int index, com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.set(index, builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.add(value); + onChanged(); + } else { + bboxesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(int index, com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.add(index, value); + onChanged(); + } else { + bboxesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.add(builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(int index, com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.add(index, builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addAllBboxes( + java.lang.Iterable values) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bboxes_); + onChanged(); + } else { + bboxesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder clearBboxes() { + if (bboxesBuilder_ == null) { + bboxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + bboxesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder removeBboxes(int index) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.remove(index); + onChanged(); + } else { + bboxesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder getBboxesBuilder(int index) { + return getBboxesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index) { + if (bboxesBuilder_ == null) { + return bboxes_.get(index); + } else { + return bboxesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List + getBboxesOrBuilderList() { + if (bboxesBuilder_ != null) { + return bboxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bboxes_); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder addBboxesBuilder() { + return getBboxesFieldBuilder().addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder addBboxesBuilder(int index) { + return getBboxesFieldBuilder() + .addBuilder(index, com.google.protobuf.ListValue.getDefaultInstance()); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List getBboxesBuilderList() { + return getBboxesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + getBboxesFieldBuilder() { + if (bboxesBuilder_ == null) { + bboxesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder>( + bboxes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + bboxes_ = null; + } + return bboxesBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageObjectDetectionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageObjectDetectionPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java new file mode 100644 index 000000000..13108789d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java @@ -0,0 +1,238 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface ImageObjectDetectionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + long getIds(int index); + + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + java.util.List getDisplayNamesList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + int getDisplayNamesCount(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + java.lang.String getDisplayNames(int index); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + com.google.protobuf.ByteString getDisplayNamesBytes(int index); + + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + java.util.List getConfidencesList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + int getConfidencesCount(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + float getConfidences(int index); + + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + java.util.List getBboxesList(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + com.google.protobuf.ListValue getBboxes(int index); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + int getBboxesCount(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + java.util.List getBboxesOrBuilderList(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java new file mode 100644 index 000000000..b915b8543 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class ImageObjectDetectionPredictionResultProto { + private ImageObjectDetectionPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nVgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/image_object_detecti" + + "on.proto\0229google.cloud.aiplatform.v1beta" + + "1.schema.predict.prediction\032\034google/prot" + + "obuf/struct.proto\032\034google/api/annotation" + + "s.proto\"\213\001\n$ImageObjectDetectionPredicti" + + "onResult\022\013\n\003ids\030\001 \003(\003\022\025\n\rdisplay_names\030\002" + + " \003(\t\022\023\n\013confidences\030\003 \003(\002\022*\n\006bboxes\030\004 \003(" + + "\0132\032.google.protobuf.ListValueB\321\001\n=com.go" + + "ogle.cloud.aiplatform.v1beta1.schema.pre" + + "dict.predictionB)ImageObjectDetectionPre" + + "dictionResultProtoP\001Zcgoogle.golang.org/" + + "genproto/googleapis/cloud/aiplatform/v1b" + + "eta1/schema/predict/prediction;predictio" + + "nb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor, + new java.lang.String[] { + "Ids", "DisplayNames", "Confidences", "Bboxes", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResult.java new file mode 100644 index 000000000..6dcacd406 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResult.java @@ -0,0 +1,756 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult} + */ +public final class ImageSegmentationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult) + ImageSegmentationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageSegmentationPredictionResult.newBuilder() to construct. + private ImageSegmentationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageSegmentationPredictionResult() { + categoryMask_ = com.google.protobuf.ByteString.EMPTY; + confidenceMask_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageSegmentationPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageSegmentationPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + categoryMask_ = input.readBytes(); + break; + } + case 18: + { + confidenceMask_ = input.readBytes(); + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.Builder.class); + } + + public static final int CATEGORY_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString categoryMask_; + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * bytes category_mask = 1; + * + * @return The categoryMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryMask() { + return categoryMask_; + } + + public static final int CONFIDENCE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString confidenceMask_; + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * bytes confidence_mask = 2; + * + * @return The confidenceMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfidenceMask() { + return confidenceMask_; + } + + 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 (!categoryMask_.isEmpty()) { + output.writeBytes(1, categoryMask_); + } + if (!confidenceMask_.isEmpty()) { + output.writeBytes(2, confidenceMask_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!categoryMask_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, categoryMask_); + } + if (!confidenceMask_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, confidenceMask_); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult) + obj; + + if (!getCategoryMask().equals(other.getCategoryMask())) return false; + if (!getConfidenceMask().equals(other.getConfidenceMask())) 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) + CATEGORY_MASK_FIELD_NUMBER; + hash = (53 * hash) + getCategoryMask().hashCode(); + hash = (37 * hash) + CONFIDENCE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceMask().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Image Segmentation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult.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(); + categoryMask_ = com.google.protobuf.ByteString.EMPTY; + + confidenceMask_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult(this); + result.categoryMask_ = categoryMask_; + result.confidenceMask_ = confidenceMask_; + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult.getDefaultInstance()) return this; + if (other.getCategoryMask() != com.google.protobuf.ByteString.EMPTY) { + setCategoryMask(other.getCategoryMask()); + } + if (other.getConfidenceMask() != com.google.protobuf.ByteString.EMPTY) { + setConfidenceMask(other.getConfidenceMask()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString categoryMask_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * bytes category_mask = 1; + * + * @return The categoryMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryMask() { + return categoryMask_; + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * bytes category_mask = 1; + * + * @param value The categoryMask to set. + * @return This builder for chaining. + */ + public Builder setCategoryMask(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + categoryMask_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * bytes category_mask = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategoryMask() { + + categoryMask_ = getDefaultInstance().getCategoryMask(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString confidenceMask_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * bytes confidence_mask = 2; + * + * @return The confidenceMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfidenceMask() { + return confidenceMask_; + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * bytes confidence_mask = 2; + * + * @param value The confidenceMask to set. + * @return This builder for chaining. + */ + public Builder setConfidenceMask(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + confidenceMask_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * bytes confidence_mask = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceMask() { + + confidenceMask_ = getDefaultInstance().getConfidenceMask(); + 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.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSegmentationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSegmentationPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java new file mode 100644 index 000000000..2a2d9c287 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface ImageSegmentationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageSegmentationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * bytes category_mask = 1; + * + * @return The categoryMask. + */ + com.google.protobuf.ByteString getCategoryMask(); + + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * bytes confidence_mask = 2; + * + * @return The confidenceMask. + */ + com.google.protobuf.ByteString getConfidenceMask(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java new file mode 100644 index 000000000..602053117 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class ImageSegmentationPredictionResultProto { + private ImageSegmentationPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nRgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/image_segmentation.p" + + "roto\0229google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.prediction\032\034google/api/anno" + + "tations.proto\"S\n!ImageSegmentationPredic" + + "tionResult\022\025\n\rcategory_mask\030\001 \001(\014\022\027\n\017con" + + "fidence_mask\030\002 \001(\014B\316\001\n=com.google.cloud." + + "aiplatform.v1beta1.schema.predict.predic" + + "tionB&ImageSegmentationPredictionResultP" + + "rotoP\001Zcgoogle.golang.org/genproto/googl" + + "eapis/cloud/aiplatform/v1beta1/schema/pr" + + "edict/prediction;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor, + new java.lang.String[] { + "CategoryMask", "ConfidenceMask", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResult.java new file mode 100644 index 000000000..c4243a81b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResult.java @@ -0,0 +1,1089 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Tabular Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult} + */ +public final class TabularClassificationPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult) + TabularClassificationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TabularClassificationPredictionResult.newBuilder() to construct. + private TabularClassificationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TabularClassificationPredictionResult() { + classes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + scores_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TabularClassificationPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TabularClassificationPredictionResult( + 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)) { + classes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + classes_.add(s); + break; + } + case 21: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + scores_ = newFloatList(); + mutable_bitField0_ |= 0x00000002; + } + scores_.addFloat(input.readFloat()); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + scores_ = newFloatList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + scores_.addFloat(input.readFloat()); + } + input.popLimit(limit); + 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)) { + classes_ = classes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + scores_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.Builder.class); + } + + public static final int CLASSES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList classes_; + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @return A list containing the classes. + */ + public com.google.protobuf.ProtocolStringList getClassesList() { + return classes_; + } + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @return The count of classes. + */ + public int getClassesCount() { + return classes_.size(); + } + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @param index The index of the element to return. + * @return The classes at the given index. + */ + public java.lang.String getClasses(int index) { + return classes_.get(index); + } + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the classes at the given index. + */ + public com.google.protobuf.ByteString getClassesBytes(int index) { + return classes_.getByteString(index); + } + + public static final int SCORES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.FloatList scores_; + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + @java.lang.Override + public java.util.List getScoresList() { + return scores_; + } + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + public int getScoresCount() { + return scores_.size(); + } + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + public float getScores(int index) { + return scores_.getFloat(index); + } + + private int scoresMemoizedSerializedSize = -1; + + 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 { + getSerializedSize(); + for (int i = 0; i < classes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, classes_.getRaw(i)); + } + if (getScoresList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(scoresMemoizedSerializedSize); + } + for (int i = 0; i < scores_.size(); i++) { + output.writeFloatNoTag(scores_.getFloat(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 < classes_.size(); i++) { + dataSize += computeStringSizeNoTag(classes_.getRaw(i)); + } + size += dataSize; + size += 1 * getClassesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getScoresList().size(); + size += dataSize; + if (!getScoresList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + scoresMemoizedSerializedSize = dataSize; + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult) + obj; + + if (!getClassesList().equals(other.getClassesList())) return false; + if (!getScoresList().equals(other.getScoresList())) 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 (getClassesCount() > 0) { + hash = (37 * hash) + CLASSES_FIELD_NUMBER; + hash = (53 * hash) + getClassesList().hashCode(); + } + if (getScoresCount() > 0) { + hash = (37 * hash) + SCORES_FIELD_NUMBER; + hash = (53 * hash) + getScoresList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Tabular Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult.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(); + classes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + scores_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + classes_ = classes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.classes_ = classes_; + if (((bitField0_ & 0x00000002) != 0)) { + scores_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.scores_ = scores_; + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult.getDefaultInstance()) return this; + if (!other.classes_.isEmpty()) { + if (classes_.isEmpty()) { + classes_ = other.classes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClassesIsMutable(); + classes_.addAll(other.classes_); + } + onChanged(); + } + if (!other.scores_.isEmpty()) { + if (scores_.isEmpty()) { + scores_ = other.scores_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureScoresIsMutable(); + scores_.addAll(other.scores_); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList classes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureClassesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + classes_ = new com.google.protobuf.LazyStringArrayList(classes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @return A list containing the classes. + */ + public com.google.protobuf.ProtocolStringList getClassesList() { + return classes_.getUnmodifiableView(); + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @return The count of classes. + */ + public int getClassesCount() { + return classes_.size(); + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param index The index of the element to return. + * @return The classes at the given index. + */ + public java.lang.String getClasses(int index) { + return classes_.get(index); + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the classes at the given index. + */ + public com.google.protobuf.ByteString getClassesBytes(int index) { + return classes_.getByteString(index); + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param index The index to set the value at. + * @param value The classes to set. + * @return This builder for chaining. + */ + public Builder setClasses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassesIsMutable(); + classes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param value The classes to add. + * @return This builder for chaining. + */ + public Builder addClasses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassesIsMutable(); + classes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param values The classes to add. + * @return This builder for chaining. + */ + public Builder addAllClasses(java.lang.Iterable values) { + ensureClassesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, classes_); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @return This builder for chaining. + */ + public Builder clearClasses() { + classes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the classes being classified, contains all possible values of
+     * the target column.
+     * 
+ * + * repeated string classes = 1; + * + * @param value The bytes of the classes to add. + * @return This builder for chaining. + */ + public Builder addClassesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClassesIsMutable(); + classes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList scores_ = emptyFloatList(); + + private void ensureScoresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + scores_ = mutableCopy(scores_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + public java.util.List getScoresList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(scores_) + : scores_; + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + public int getScoresCount() { + return scores_.size(); + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + public float getScores(int index) { + return scores_.getFloat(index); + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @param index The index to set the value at. + * @param value The scores to set. + * @return This builder for chaining. + */ + public Builder setScores(int index, float value) { + ensureScoresIsMutable(); + scores_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @param value The scores to add. + * @return This builder for chaining. + */ + public Builder addScores(float value) { + ensureScoresIsMutable(); + scores_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @param values The scores to add. + * @return This builder for chaining. + */ + public Builder addAllScores(java.lang.Iterable values) { + ensureScoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scores_); + onChanged(); + return this; + } + /** + * + * + *
+     * The model's confidence in each class being correct, higher
+     * value means higher confidence. The N-th score corresponds to
+     * the N-th class in classes.
+     * 
+ * + * repeated float scores = 2; + * + * @return This builder for chaining. + */ + public Builder clearScores() { + scores_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + 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.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TabularClassificationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TabularClassificationPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .TabularClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..c21fe7fe2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface TabularClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularClassificationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @return A list containing the classes. + */ + java.util.List getClassesList(); + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @return The count of classes. + */ + int getClassesCount(); + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @param index The index of the element to return. + * @return The classes at the given index. + */ + java.lang.String getClasses(int index); + /** + * + * + *
+   * The name of the classes being classified, contains all possible values of
+   * the target column.
+   * 
+ * + * repeated string classes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the classes at the given index. + */ + com.google.protobuf.ByteString getClassesBytes(int index); + + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + java.util.List getScoresList(); + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + int getScoresCount(); + /** + * + * + *
+   * The model's confidence in each class being correct, higher
+   * value means higher confidence. The N-th score corresponds to
+   * the N-th class in classes.
+   * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + float getScores(int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultProto.java new file mode 100644 index 000000000..422c919d2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class TabularClassificationPredictionResultProto { + private TabularClassificationPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nVgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/tabular_classificati" + + "on.proto\0229google.cloud.aiplatform.v1beta" + + "1.schema.predict.prediction\032\034google/api/" + + "annotations.proto\"H\n%TabularClassificati" + + "onPredictionResult\022\017\n\007classes\030\001 \003(\t\022\016\n\006s" + + "cores\030\002 \003(\002B\322\001\n=com.google.cloud.aiplatf" + + "orm.v1beta1.schema.predict.predictionB*T" + + "abularClassificationPredictionResultProt" + + "oP\001Zcgoogle.golang.org/genproto/googleap" + + "is/cloud/aiplatform/v1beta1/schema/predi" + + "ct/prediction;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor, + new java.lang.String[] { + "Classes", "Scores", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResult.java new file mode 100644 index 000000000..eee97a45e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResult.java @@ -0,0 +1,804 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Tabular Regression.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult} + */ +public final class TabularRegressionPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult) + TabularRegressionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TabularRegressionPredictionResult.newBuilder() to construct. + private TabularRegressionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TabularRegressionPredictionResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TabularRegressionPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TabularRegressionPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + value_ = input.readFloat(); + break; + } + case 21: + { + lowerBound_ = input.readFloat(); + break; + } + case 29: + { + upperBound_ = input.readFloat(); + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private float value_; + /** + * + * + *
+   * The regression value.
+   * 
+ * + * float value = 1; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 2; + private float lowerBound_; + /** + * + * + *
+   * The lower bound of the prediction interval.
+   * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + @java.lang.Override + public float getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 3; + private float upperBound_; + /** + * + * + *
+   * The upper bound of the prediction interval.
+   * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + @java.lang.Override + public float getUpperBound() { + return upperBound_; + } + + 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 (value_ != 0F) { + output.writeFloat(1, value_); + } + if (lowerBound_ != 0F) { + output.writeFloat(2, lowerBound_); + } + if (upperBound_ != 0F) { + output.writeFloat(3, upperBound_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, value_); + } + if (lowerBound_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, lowerBound_); + } + if (upperBound_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, upperBound_); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult) + obj; + + if (java.lang.Float.floatToIntBits(getValue()) + != java.lang.Float.floatToIntBits(other.getValue())) return false; + if (java.lang.Float.floatToIntBits(getLowerBound()) + != java.lang.Float.floatToIntBits(other.getLowerBound())) return false; + if (java.lang.Float.floatToIntBits(getUpperBound()) + != java.lang.Float.floatToIntBits(other.getUpperBound())) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getValue()); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLowerBound()); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getUpperBound()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Tabular Regression.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult.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(); + value_ = 0F; + + lowerBound_ = 0F; + + upperBound_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult(this); + result.value_ = value_; + result.lowerBound_ = lowerBound_; + result.upperBound_ = upperBound_; + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult.getDefaultInstance()) return this; + if (other.getValue() != 0F) { + setValue(other.getValue()); + } + if (other.getLowerBound() != 0F) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0F) { + setUpperBound(other.getUpperBound()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float value_; + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(float value) { + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = 0F; + onChanged(); + return this; + } + + private float lowerBound_; + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + @java.lang.Override + public float getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(float value) { + + lowerBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + + lowerBound_ = 0F; + onChanged(); + return this; + } + + private float upperBound_; + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + @java.lang.Override + public float getUpperBound() { + return upperBound_; + } + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(float value) { + + upperBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + + upperBound_ = 0F; + 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.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TabularRegressionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TabularRegressionPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .TabularRegressionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java new file mode 100644 index 000000000..e5c94b193 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface TabularRegressionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TabularRegressionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The regression value.
+   * 
+ * + * float value = 1; + * + * @return The value. + */ + float getValue(); + + /** + * + * + *
+   * The lower bound of the prediction interval.
+   * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + float getLowerBound(); + + /** + * + * + *
+   * The upper bound of the prediction interval.
+   * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + float getUpperBound(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultProto.java new file mode 100644 index 000000000..b9d5d747a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class TabularRegressionPredictionResultProto { + private TabularRegressionPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nRgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/tabular_regression.p" + + "roto\0229google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.prediction\032\034google/api/anno" + + "tations.proto\"\\\n!TabularRegressionPredic" + + "tionResult\022\r\n\005value\030\001 \001(\002\022\023\n\013lower_bound" + + "\030\002 \001(\002\022\023\n\013upper_bound\030\003 \001(\002B\316\001\n=com.goog" + + "le.cloud.aiplatform.v1beta1.schema.predi" + + "ct.predictionB&TabularRegressionPredicti" + + "onResultProtoP\001Zcgoogle.golang.org/genpr" + + "oto/googleapis/cloud/aiplatform/v1beta1/" + + "schema/predict/prediction;predictionb\006pr" + + "oto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor, + new java.lang.String[] { + "Value", "LowerBound", "UpperBound", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResult.java new file mode 100644 index 000000000..46228260f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResult.java @@ -0,0 +1,1856 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Text Extraction.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult} + */ +public final class TextExtractionPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult) + TextExtractionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextExtractionPredictionResult.newBuilder() to construct. + private TextExtractionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextExtractionPredictionResult() { + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + textSegmentStartOffsets_ = emptyLongList(); + textSegmentEndOffsets_ = emptyLongList(); + confidences_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextExtractionPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextExtractionPredictionResult( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.addLong(input.readInt64()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + ids_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + ids_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + displayNames_.add(s); + break; + } + case 24: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + textSegmentStartOffsets_ = newLongList(); + mutable_bitField0_ |= 0x00000004; + } + textSegmentStartOffsets_.addLong(input.readInt64()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + textSegmentStartOffsets_ = newLongList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + textSegmentStartOffsets_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 32: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + textSegmentEndOffsets_ = newLongList(); + mutable_bitField0_ |= 0x00000008; + } + textSegmentEndOffsets_.addLong(input.readInt64()); + break; + } + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { + textSegmentEndOffsets_ = newLongList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + textSegmentEndOffsets_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 45: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000010; + } + confidences_.addFloat(input.readFloat()); + break; + } + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { + confidences_ = newFloatList(); + mutable_bitField0_ |= 0x00000010; + } + while (input.getBytesUntilLimit() > 0) { + confidences_.addFloat(input.readFloat()); + } + input.popLimit(limit); + 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)) { + ids_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + textSegmentStartOffsets_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + textSegmentEndOffsets_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + confidences_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList ids_; + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + @java.lang.Override + public java.util.List getIdsList() { + return ids_; + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + + private int idsMemoizedSerializedSize = -1; + + public static final int DISPLAY_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList displayNames_; + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_; + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + + public static final int TEXT_SEGMENT_START_OFFSETS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.LongList textSegmentStartOffsets_; + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return A list containing the textSegmentStartOffsets. + */ + @java.lang.Override + public java.util.List getTextSegmentStartOffsetsList() { + return textSegmentStartOffsets_; + } + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return The count of textSegmentStartOffsets. + */ + public int getTextSegmentStartOffsetsCount() { + return textSegmentStartOffsets_.size(); + } + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param index The index of the element to return. + * @return The textSegmentStartOffsets at the given index. + */ + public long getTextSegmentStartOffsets(int index) { + return textSegmentStartOffsets_.getLong(index); + } + + private int textSegmentStartOffsetsMemoizedSerializedSize = -1; + + public static final int TEXT_SEGMENT_END_OFFSETS_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.LongList textSegmentEndOffsets_; + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return A list containing the textSegmentEndOffsets. + */ + @java.lang.Override + public java.util.List getTextSegmentEndOffsetsList() { + return textSegmentEndOffsets_; + } + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return The count of textSegmentEndOffsets. + */ + public int getTextSegmentEndOffsetsCount() { + return textSegmentEndOffsets_.size(); + } + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param index The index of the element to return. + * @return The textSegmentEndOffsets at the given index. + */ + public long getTextSegmentEndOffsets(int index) { + return textSegmentEndOffsets_.getLong(index); + } + + private int textSegmentEndOffsetsMemoizedSerializedSize = -1; + + public static final int CONFIDENCES_FIELD_NUMBER = 5; + private com.google.protobuf.Internal.FloatList confidences_; + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @return A list containing the confidences. + */ + @java.lang.Override + public java.util.List getConfidencesList() { + return confidences_; + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + + private int confidencesMemoizedSerializedSize = -1; + + 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 { + getSerializedSize(); + if (getIdsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(idsMemoizedSerializedSize); + } + for (int i = 0; i < ids_.size(); i++) { + output.writeInt64NoTag(ids_.getLong(i)); + } + for (int i = 0; i < displayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayNames_.getRaw(i)); + } + if (getTextSegmentStartOffsetsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(textSegmentStartOffsetsMemoizedSerializedSize); + } + for (int i = 0; i < textSegmentStartOffsets_.size(); i++) { + output.writeInt64NoTag(textSegmentStartOffsets_.getLong(i)); + } + if (getTextSegmentEndOffsetsList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(textSegmentEndOffsetsMemoizedSerializedSize); + } + for (int i = 0; i < textSegmentEndOffsets_.size(); i++) { + output.writeInt64NoTag(textSegmentEndOffsets_.getLong(i)); + } + if (getConfidencesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(confidencesMemoizedSerializedSize); + } + for (int i = 0; i < confidences_.size(); i++) { + output.writeFloatNoTag(confidences_.getFloat(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 < ids_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(ids_.getLong(i)); + } + size += dataSize; + if (!getIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + idsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < displayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(displayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDisplayNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < textSegmentStartOffsets_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + textSegmentStartOffsets_.getLong(i)); + } + size += dataSize; + if (!getTextSegmentStartOffsetsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + textSegmentStartOffsetsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < textSegmentEndOffsets_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + textSegmentEndOffsets_.getLong(i)); + } + size += dataSize; + if (!getTextSegmentEndOffsetsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + textSegmentEndOffsetsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + dataSize = 4 * getConfidencesList().size(); + size += dataSize; + if (!getConfidencesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + confidencesMemoizedSerializedSize = dataSize; + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult) + obj; + + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getDisplayNamesList().equals(other.getDisplayNamesList())) return false; + if (!getTextSegmentStartOffsetsList().equals(other.getTextSegmentStartOffsetsList())) + return false; + if (!getTextSegmentEndOffsetsList().equals(other.getTextSegmentEndOffsetsList())) return false; + if (!getConfidencesList().equals(other.getConfidencesList())) 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 (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getDisplayNamesCount() > 0) { + hash = (37 * hash) + DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDisplayNamesList().hashCode(); + } + if (getTextSegmentStartOffsetsCount() > 0) { + hash = (37 * hash) + TEXT_SEGMENT_START_OFFSETS_FIELD_NUMBER; + hash = (53 * hash) + getTextSegmentStartOffsetsList().hashCode(); + } + if (getTextSegmentEndOffsetsCount() > 0) { + hash = (37 * hash) + TEXT_SEGMENT_END_OFFSETS_FIELD_NUMBER; + hash = (53 * hash) + getTextSegmentEndOffsetsList().hashCode(); + } + if (getConfidencesCount() > 0) { + hash = (37 * hash) + CONFIDENCES_FIELD_NUMBER; + hash = (53 * hash) + getConfidencesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Text Extraction.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult.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(); + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + textSegmentStartOffsets_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000004); + textSegmentEndOffsets_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000008); + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ids_ = ids_; + if (((bitField0_ & 0x00000002) != 0)) { + displayNames_ = displayNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.displayNames_ = displayNames_; + if (((bitField0_ & 0x00000004) != 0)) { + textSegmentStartOffsets_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.textSegmentStartOffsets_ = textSegmentStartOffsets_; + if (((bitField0_ & 0x00000008) != 0)) { + textSegmentEndOffsets_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.textSegmentEndOffsets_ = textSegmentEndOffsets_; + if (((bitField0_ & 0x00000010) != 0)) { + confidences_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.confidences_ = confidences_; + 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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.displayNames_.isEmpty()) { + if (displayNames_.isEmpty()) { + displayNames_ = other.displayNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDisplayNamesIsMutable(); + displayNames_.addAll(other.displayNames_); + } + onChanged(); + } + if (!other.textSegmentStartOffsets_.isEmpty()) { + if (textSegmentStartOffsets_.isEmpty()) { + textSegmentStartOffsets_ = other.textSegmentStartOffsets_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTextSegmentStartOffsetsIsMutable(); + textSegmentStartOffsets_.addAll(other.textSegmentStartOffsets_); + } + onChanged(); + } + if (!other.textSegmentEndOffsets_.isEmpty()) { + if (textSegmentEndOffsets_.isEmpty()) { + textSegmentEndOffsets_ = other.textSegmentEndOffsets_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTextSegmentEndOffsetsIsMutable(); + textSegmentEndOffsets_.addAll(other.textSegmentEndOffsets_); + } + onChanged(); + } + if (!other.confidences_.isEmpty()) { + if (confidences_.isEmpty()) { + confidences_ = other.confidences_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureConfidencesIsMutable(); + confidences_.addAll(other.confidences_); + } + 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.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + + private void ensureIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ids_ = mutableCopy(ids_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + public java.util.List getIdsList() { + return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(ids_) : ids_; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, long value) { + ensureIdsIsMutable(); + ids_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(long value) { + ensureIdsIsMutable(); + ids_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified,
+     * ordered by the confidence score descendingly.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList displayNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDisplayNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(displayNames_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index to set the value at. + * @param value The displayNames to set. + * @return This builder for chaining. + */ + public Builder setDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param values The displayNames to add. + * @return This builder for chaining. + */ + public Builder addAllDisplayNames(java.lang.Iterable values) { + ensureDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayNames() { + displayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified,
+     * order matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The bytes of the displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList textSegmentStartOffsets_ = emptyLongList(); + + private void ensureTextSegmentStartOffsetsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + textSegmentStartOffsets_ = mutableCopy(textSegmentStartOffsets_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return A list containing the textSegmentStartOffsets. + */ + public java.util.List getTextSegmentStartOffsetsList() { + return ((bitField0_ & 0x00000004) != 0) + ? java.util.Collections.unmodifiableList(textSegmentStartOffsets_) + : textSegmentStartOffsets_; + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return The count of textSegmentStartOffsets. + */ + public int getTextSegmentStartOffsetsCount() { + return textSegmentStartOffsets_.size(); + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param index The index of the element to return. + * @return The textSegmentStartOffsets at the given index. + */ + public long getTextSegmentStartOffsets(int index) { + return textSegmentStartOffsets_.getLong(index); + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param index The index to set the value at. + * @param value The textSegmentStartOffsets to set. + * @return This builder for chaining. + */ + public Builder setTextSegmentStartOffsets(int index, long value) { + ensureTextSegmentStartOffsetsIsMutable(); + textSegmentStartOffsets_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param value The textSegmentStartOffsets to add. + * @return This builder for chaining. + */ + public Builder addTextSegmentStartOffsets(long value) { + ensureTextSegmentStartOffsetsIsMutable(); + textSegmentStartOffsets_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param values The textSegmentStartOffsets to add. + * @return This builder for chaining. + */ + public Builder addAllTextSegmentStartOffsets( + java.lang.Iterable values) { + ensureTextSegmentStartOffsetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textSegmentStartOffsets_); + onChanged(); + return this; + } + /** + * + * + *
+     * The start offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return This builder for chaining. + */ + public Builder clearTextSegmentStartOffsets() { + textSegmentStartOffsets_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList textSegmentEndOffsets_ = emptyLongList(); + + private void ensureTextSegmentEndOffsetsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + textSegmentEndOffsets_ = mutableCopy(textSegmentEndOffsets_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return A list containing the textSegmentEndOffsets. + */ + public java.util.List getTextSegmentEndOffsetsList() { + return ((bitField0_ & 0x00000008) != 0) + ? java.util.Collections.unmodifiableList(textSegmentEndOffsets_) + : textSegmentEndOffsets_; + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return The count of textSegmentEndOffsets. + */ + public int getTextSegmentEndOffsetsCount() { + return textSegmentEndOffsets_.size(); + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param index The index of the element to return. + * @return The textSegmentEndOffsets at the given index. + */ + public long getTextSegmentEndOffsets(int index) { + return textSegmentEndOffsets_.getLong(index); + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param index The index to set the value at. + * @param value The textSegmentEndOffsets to set. + * @return This builder for chaining. + */ + public Builder setTextSegmentEndOffsets(int index, long value) { + ensureTextSegmentEndOffsetsIsMutable(); + textSegmentEndOffsets_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param value The textSegmentEndOffsets to add. + * @return This builder for chaining. + */ + public Builder addTextSegmentEndOffsets(long value) { + ensureTextSegmentEndOffsetsIsMutable(); + textSegmentEndOffsets_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param values The textSegmentEndOffsets to add. + * @return This builder for chaining. + */ + public Builder addAllTextSegmentEndOffsets( + java.lang.Iterable values) { + ensureTextSegmentEndOffsetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textSegmentEndOffsets_); + onChanged(); + return this; + } + /** + * + * + *
+     * The end offsets, inclusive, of the text segment in which the
+     * AnnotationSpec has been identified. Expressed as a zero-based number
+     * of characters as measured from the start of the text snippet.
+     * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return This builder for chaining. + */ + public Builder clearTextSegmentEndOffsets() { + textSegmentEndOffsets_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + + private void ensureConfidencesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + confidences_ = mutableCopy(confidences_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @return A list containing the confidences. + */ + public java.util.List getConfidencesList() { + return ((bitField0_ & 0x00000010) != 0) + ? java.util.Collections.unmodifiableList(confidences_) + : confidences_; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @param index The index to set the value at. + * @param value The confidences to set. + * @return This builder for chaining. + */ + public Builder setConfidences(int index, float value) { + ensureConfidencesIsMutable(); + confidences_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @param value The confidences to add. + * @return This builder for chaining. + */ + public Builder addConfidences(float value) { + ensureConfidencesIsMutable(); + confidences_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @param values The confidences to add. + * @return This builder for chaining. + */ + public Builder addAllConfidences(java.lang.Iterable values) { + ensureConfidencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidences_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher
+     * value means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 5; + * + * @return This builder for chaining. + */ + public Builder clearConfidences() { + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000010); + 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.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextExtractionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextExtractionPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .TextExtractionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java new file mode 100644 index 000000000..a2624a6cd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface TextExtractionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified,
+   * ordered by the confidence score descendingly.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + long getIds(int index); + + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + java.util.List getDisplayNamesList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + int getDisplayNamesCount(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + java.lang.String getDisplayNames(int index); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified,
+   * order matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + com.google.protobuf.ByteString getDisplayNamesBytes(int index); + + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return A list containing the textSegmentStartOffsets. + */ + java.util.List getTextSegmentStartOffsetsList(); + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @return The count of textSegmentStartOffsets. + */ + int getTextSegmentStartOffsetsCount(); + /** + * + * + *
+   * The start offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_start_offsets = 3; + * + * @param index The index of the element to return. + * @return The textSegmentStartOffsets at the given index. + */ + long getTextSegmentStartOffsets(int index); + + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return A list containing the textSegmentEndOffsets. + */ + java.util.List getTextSegmentEndOffsetsList(); + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @return The count of textSegmentEndOffsets. + */ + int getTextSegmentEndOffsetsCount(); + /** + * + * + *
+   * The end offsets, inclusive, of the text segment in which the
+   * AnnotationSpec has been identified. Expressed as a zero-based number
+   * of characters as measured from the start of the text snippet.
+   * 
+ * + * repeated int64 text_segment_end_offsets = 4; + * + * @param index The index of the element to return. + * @return The textSegmentEndOffsets at the given index. + */ + long getTextSegmentEndOffsets(int index); + + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @return A list containing the confidences. + */ + java.util.List getConfidencesList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @return The count of confidences. + */ + int getConfidencesCount(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher
+   * value means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 5; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + float getConfidences(int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultProto.java new file mode 100644 index 000000000..39d1bc36f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultProto.java @@ -0,0 +1,80 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class TextExtractionPredictionResultProto { + private TextExtractionPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nOgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/text_extraction.prot" + + "o\0229google.cloud.aiplatform.v1beta1.schem" + + "a.predict.prediction\032\034google/api/annotat" + + "ions.proto\"\237\001\n\036TextExtractionPredictionR" + + "esult\022\013\n\003ids\030\001 \003(\003\022\025\n\rdisplay_names\030\002 \003(" + + "\t\022\"\n\032text_segment_start_offsets\030\003 \003(\003\022 \n" + + "\030text_segment_end_offsets\030\004 \003(\003\022\023\n\013confi" + + "dences\030\005 \003(\002B\313\001\n=com.google.cloud.aiplat" + + "form.v1beta1.schema.predict.predictionB#" + + "TextExtractionPredictionResultProtoP\001Zcg" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/aiplatform/v1beta1/schema/predict/pre" + + "diction;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextExtractionPredictionResult_descriptor, + new java.lang.String[] { + "Ids", + "DisplayNames", + "TextSegmentStartOffsets", + "TextSegmentEndOffsets", + "Confidences", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResult.java new file mode 100644 index 000000000..ed8ab726d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResult.java @@ -0,0 +1,1850 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Represents a line of JSONL in the text sentiment batch prediction output
+ * file. This is a hack to allow printing of integer values.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult} + */ +public final class TextSentimentPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult) + TextSentimentPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextSentimentPredictionResult.newBuilder() to construct. + private TextSentimentPredictionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextSentimentPredictionResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextSentimentPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextSentimentPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder + subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder + subBuilder = null; + if (prediction_ != null) { + subBuilder = prediction_.toBuilder(); + } + prediction_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(prediction_); + prediction_ = 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Builder.class); + } + + public interface PredictionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The integer sentiment labels between 0 (inclusive) and sentimentMax label
+     * (inclusive), while 0 maps to the least positive sentiment and
+     * sentimentMax maps to the most positive one. The higher the score is, the
+     * more positive the sentiment in the text snippet is. Note: sentimentMax is
+     * an integer value between 1 (inclusive) and 10 (inclusive).
+     * 
+ * + * int32 sentiment = 1; + * + * @return The sentiment. + */ + int getSentiment(); + } + /** + * + * + *
+   * Prediction output format for Text Sentiment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction} + */ + public static final class Prediction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction) + PredictionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Prediction.newBuilder() to construct. + private Prediction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Prediction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Prediction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Prediction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sentiment_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder.class); + } + + public static final int SENTIMENT_FIELD_NUMBER = 1; + private int sentiment_; + /** + * + * + *
+     * The integer sentiment labels between 0 (inclusive) and sentimentMax label
+     * (inclusive), while 0 maps to the least positive sentiment and
+     * sentimentMax maps to the most positive one. The higher the score is, the
+     * more positive the sentiment in the text snippet is. Note: sentimentMax is
+     * an integer value between 1 (inclusive) and 10 (inclusive).
+     * 
+ * + * int32 sentiment = 1; + * + * @return The sentiment. + */ + @java.lang.Override + public int getSentiment() { + return sentiment_; + } + + 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 (sentiment_ != 0) { + output.writeInt32(1, sentiment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sentiment_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sentiment_); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction) + obj; + + if (getSentiment() != other.getSentiment()) 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) + SENTIMENT_FIELD_NUMBER; + hash = (53 * hash) + getSentiment(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + 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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + 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; + } + /** + * + * + *
+     * Prediction output format for Text Sentiment.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .PredictionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction.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(); + sentiment_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction(this); + result.sentiment_ = sentiment_; + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.getDefaultInstance()) return this; + if (other.getSentiment() != 0) { + setSentiment(other.getSentiment()); + } + 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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sentiment_; + /** + * + * + *
+       * The integer sentiment labels between 0 (inclusive) and sentimentMax label
+       * (inclusive), while 0 maps to the least positive sentiment and
+       * sentimentMax maps to the most positive one. The higher the score is, the
+       * more positive the sentiment in the text snippet is. Note: sentimentMax is
+       * an integer value between 1 (inclusive) and 10 (inclusive).
+       * 
+ * + * int32 sentiment = 1; + * + * @return The sentiment. + */ + @java.lang.Override + public int getSentiment() { + return sentiment_; + } + /** + * + * + *
+       * The integer sentiment labels between 0 (inclusive) and sentimentMax label
+       * (inclusive), while 0 maps to the least positive sentiment and
+       * sentimentMax maps to the most positive one. The higher the score is, the
+       * more positive the sentiment in the text snippet is. Note: sentimentMax is
+       * an integer value between 1 (inclusive) and 10 (inclusive).
+       * 
+ * + * int32 sentiment = 1; + * + * @param value The sentiment to set. + * @return This builder for chaining. + */ + public Builder setSentiment(int value) { + + sentiment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The integer sentiment labels between 0 (inclusive) and sentimentMax label
+       * (inclusive), while 0 maps to the least positive sentiment and
+       * sentimentMax maps to the most positive one. The higher the score is, the
+       * more positive the sentiment in the text snippet is. Note: sentimentMax is
+       * an integer value between 1 (inclusive) and 10 (inclusive).
+       * 
+ * + * int32 sentiment = 1; + * + * @return This builder for chaining. + */ + public Builder clearSentiment() { + + sentiment_ = 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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Prediction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Prediction(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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + instance_; + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + getInstance() { + return instance_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder + getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PREDICTION_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + prediction_; + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return Whether the prediction field is set. + */ + @java.lang.Override + public boolean hasPrediction() { + return prediction_ != null; + } + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return The prediction. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + getPrediction() { + return prediction_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.getDefaultInstance() + : prediction_; + } + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .PredictionOrBuilder + getPredictionOrBuilder() { + return getPrediction(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (prediction_ != null) { + output.writeMessage(2, getPrediction()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstance()); + } + if (prediction_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrediction()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult) + obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (hasPrediction() != other.hasPrediction()) return false; + if (hasPrediction()) { + if (!getPrediction().equals(other.getPrediction())) 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 (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (hasPrediction()) { + hash = (37 * hash) + PREDICTION_FIELD_NUMBER; + hash = (53 * hash) + getPrediction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + 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; + } + /** + * + * + *
+   * Represents a line of JSONL in the text sentiment batch prediction output
+   * file. This is a hack to allow printing of integer values.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.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 (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + if (predictionBuilder_ == null) { + prediction_ = null; + } else { + prediction_ = null; + predictionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (predictionBuilder_ == null) { + result.prediction_ = prediction_; + } else { + result.prediction_ = predictionBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.hasPrediction()) { + mergePrediction(other.getPrediction()); + } + 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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return The instance. + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance + getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public Builder setInstance( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public Builder setInstance( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + .Builder + builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public Builder mergeInstance( + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder + getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder + getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * User's input instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstance.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + prediction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.PredictionOrBuilder> + predictionBuilder_; + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return Whether the prediction field is set. + */ + public boolean hasPrediction() { + return predictionBuilder_ != null || prediction_ != null; + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return The prediction. + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction + getPrediction() { + if (predictionBuilder_ == null) { + return prediction_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.getDefaultInstance() + : prediction_; + } else { + return predictionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public Builder setPrediction( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + value) { + if (predictionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + prediction_ = value; + onChanged(); + } else { + predictionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public Builder setPrediction( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction.Builder + builderForValue) { + if (predictionBuilder_ == null) { + prediction_ = builderForValue.build(); + onChanged(); + } else { + predictionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public Builder mergePrediction( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + value) { + if (predictionBuilder_ == null) { + if (prediction_ != null) { + prediction_ = + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.newBuilder(prediction_) + .mergeFrom(value) + .buildPartial(); + } else { + prediction_ = value; + } + onChanged(); + } else { + predictionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public Builder clearPrediction() { + if (predictionBuilder_ == null) { + prediction_ = null; + onChanged(); + } else { + prediction_ = null; + predictionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder + getPredictionBuilder() { + + onChanged(); + return getPredictionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.PredictionOrBuilder + getPredictionOrBuilder() { + if (predictionBuilder_ != null) { + return predictionBuilder_.getMessageOrBuilder(); + } else { + return prediction_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.getDefaultInstance() + : prediction_; + } + } + /** + * + * + *
+     * The prediction result.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.PredictionOrBuilder> + getPredictionFieldBuilder() { + if (predictionBuilder_ == null) { + predictionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.Prediction.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult.PredictionOrBuilder>( + getPrediction(), getParentForChildren(), isClean()); + prediction_ = null; + } + return predictionBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TextSentimentPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextSentimentPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextSentimentPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java new file mode 100644 index 000000000..623808c17 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface TextSentimentPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + * + * @return The instance. + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance + getInstance(); + /** + * + * + *
+   * User's input instance.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder + getInstanceOrBuilder(); + + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return Whether the prediction field is set. + */ + boolean hasPrediction(); + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + * + * @return The prediction. + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .Prediction + getPrediction(); + /** + * + * + *
+   * The prediction result.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult.Prediction prediction = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextSentimentPredictionResult + .PredictionOrBuilder + getPredictionOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultProto.java new file mode 100644 index 000000000..8c0e1538b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultProto.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class TextSentimentPredictionResultProto { + private TextSentimentPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nNgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/text_sentiment.proto" + + "\0229google.cloud.aiplatform.v1beta1.schema" + + ".predict.prediction\032Lgoogle/cloud/aiplat" + + "form/v1beta1/schema/predict/instance/tex" + + "t_sentiment.proto\032\034google/api/annotation" + + "s.proto\"\245\002\n\035TextSentimentPredictionResul" + + "t\022j\n\010instance\030\001 \001(\0132X.google.cloud.aipla" + + "tform.v1beta1.schema.predict.instance.Te" + + "xtSentimentPredictionInstance\022w\n\npredict" + + "ion\030\002 \001(\0132c.google.cloud.aiplatform.v1be" + + "ta1.schema.predict.prediction.TextSentim" + + "entPredictionResult.Prediction\032\037\n\nPredic" + + "tion\022\021\n\tsentiment\030\001 \001(\005B\312\001\n=com.google.c" + + "loud.aiplatform.v1beta1.schema.predict.p" + + "redictionB\"TextSentimentPredictionResult" + + "ProtoP\001Zcgoogle.golang.org/genproto/goog" + + "leapis/cloud/aiplatform/v1beta1/schema/p" + + "redict/prediction;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.aiplatform.v1beta1.schema.predict.instance + .TextSentimentPredictionInstanceProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor, + new java.lang.String[] { + "Instance", "Prediction", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TextSentimentPredictionResult_Prediction_descriptor, + new java.lang.String[] { + "Sentiment", + }); + com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstanceProto + .getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResult.java new file mode 100644 index 000000000..f7670b130 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResult.java @@ -0,0 +1,806 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Time Series Forecasting.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult} + */ +public final class TimeSeriesForecastingPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult) + TimeSeriesForecastingPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeSeriesForecastingPredictionResult.newBuilder() to construct. + private TimeSeriesForecastingPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimeSeriesForecastingPredictionResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimeSeriesForecastingPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimeSeriesForecastingPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + value_ = input.readFloat(); + break; + } + case 21: + { + lowerBound_ = input.readFloat(); + break; + } + case 29: + { + upperBound_ = input.readFloat(); + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private float value_; + /** + * + * + *
+   * The regression value.
+   * 
+ * + * float value = 1; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 2; + private float lowerBound_; + /** + * + * + *
+   * The lower bound of the prediction interval.
+   * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + @java.lang.Override + public float getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 3; + private float upperBound_; + /** + * + * + *
+   * The upper bound of the prediction interval.
+   * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + @java.lang.Override + public float getUpperBound() { + return upperBound_; + } + + 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 (value_ != 0F) { + output.writeFloat(1, value_); + } + if (lowerBound_ != 0F) { + output.writeFloat(2, lowerBound_); + } + if (upperBound_ != 0F) { + output.writeFloat(3, upperBound_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, value_); + } + if (lowerBound_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, lowerBound_); + } + if (upperBound_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, upperBound_); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult) + obj; + + if (java.lang.Float.floatToIntBits(getValue()) + != java.lang.Float.floatToIntBits(other.getValue())) return false; + if (java.lang.Float.floatToIntBits(getLowerBound()) + != java.lang.Float.floatToIntBits(other.getLowerBound())) return false; + if (java.lang.Float.floatToIntBits(getUpperBound()) + != java.lang.Float.floatToIntBits(other.getUpperBound())) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getValue()); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLowerBound()); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getUpperBound()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Time Series Forecasting.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult.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(); + value_ = 0F; + + lowerBound_ = 0F; + + upperBound_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult(this); + result.value_ = value_; + result.lowerBound_ = lowerBound_; + result.upperBound_ = upperBound_; + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult.getDefaultInstance()) return this; + if (other.getValue() != 0F) { + setValue(other.getValue()); + } + if (other.getLowerBound() != 0F) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0F) { + setUpperBound(other.getUpperBound()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float value_; + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(float value) { + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The regression value.
+     * 
+ * + * float value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = 0F; + onChanged(); + return this; + } + + private float lowerBound_; + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + @java.lang.Override + public float getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(float value) { + + lowerBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The lower bound of the prediction interval.
+     * 
+ * + * float lower_bound = 2; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + + lowerBound_ = 0F; + onChanged(); + return this; + } + + private float upperBound_; + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + @java.lang.Override + public float getUpperBound() { + return upperBound_; + } + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(float value) { + + upperBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The upper bound of the prediction interval.
+     * 
+ * + * float upper_bound = 3; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + + upperBound_ = 0F; + 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.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeSeriesForecastingPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeSeriesForecastingPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .TimeSeriesForecastingPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultOrBuilder.java new file mode 100644 index 000000000..b56e2964e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface TimeSeriesForecastingPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.TimeSeriesForecastingPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The regression value.
+   * 
+ * + * float value = 1; + * + * @return The value. + */ + float getValue(); + + /** + * + * + *
+   * The lower bound of the prediction interval.
+   * 
+ * + * float lower_bound = 2; + * + * @return The lowerBound. + */ + float getLowerBound(); + + /** + * + * + *
+   * The upper bound of the prediction interval.
+   * 
+ * + * float upper_bound = 3; + * + * @return The upperBound. + */ + float getUpperBound(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultProto.java new file mode 100644 index 000000000..bccf02c30 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class TimeSeriesForecastingPredictionResultProto { + private TimeSeriesForecastingPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nWgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/time_series_forecast" + + "ing.proto\0229google.cloud.aiplatform.v1bet" + + "a1.schema.predict.prediction\032\034google/api" + + "/annotations.proto\"`\n%TimeSeriesForecast" + + "ingPredictionResult\022\r\n\005value\030\001 \001(\002\022\023\n\013lo" + + "wer_bound\030\002 \001(\002\022\023\n\013upper_bound\030\003 \001(\002B\322\001\n" + + "=com.google.cloud.aiplatform.v1beta1.sch" + + "ema.predict.predictionB*TimeSeriesForeca" + + "stingPredictionResultProtoP\001Zcgoogle.gol" + + "ang.org/genproto/googleapis/cloud/aiplat" + + "form/v1beta1/schema/predict/prediction;p" + + "redictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_TimeSeriesForecastingPredictionResult_descriptor, + new java.lang.String[] { + "Value", "LowerBound", "UpperBound", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java new file mode 100644 index 000000000..4244393c4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java @@ -0,0 +1,1802 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult} + */ +public final class VideoActionRecognitionPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + VideoActionRecognitionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoActionRecognitionPredictionResult.newBuilder() to construct. + private VideoActionRecognitionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoActionRecognitionPredictionResult() { + id_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoActionRecognitionPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoActionRecognitionPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentStart_ != null) { + subBuilder = timeSegmentStart_.toBuilder(); + } + timeSegmentStart_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentStart_); + timeSegmentStart_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentEnd_ != null) { + subBuilder = timeSegmentEnd_.toBuilder(); + } + timeSegmentEnd_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentEnd_); + timeSegmentEnd_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (confidence_ != null) { + subBuilder = confidence_.toBuilder(); + } + confidence_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(confidence_); + confidence_ = 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = 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_; + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + 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 TIME_SEGMENT_START_FIELD_NUMBER = 4; + private com.google.protobuf.Duration timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentStart() { + return timeSegmentStart_ != null; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentStart() { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + return getTimeSegmentStart(); + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 5; + private com.google.protobuf.Duration timeSegmentEnd_; + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentEnd() { + return timeSegmentEnd_ != null; + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentEnd() { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + return getTimeSegmentEnd(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 6; + private com.google.protobuf.FloatValue confidence_; + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + @java.lang.Override + public boolean hasConfidence() { + return confidence_ != null; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getConfidence() { + return confidence_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : confidence_; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + return getConfidence(); + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (timeSegmentStart_ != null) { + output.writeMessage(4, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + output.writeMessage(5, getTimeSegmentEnd()); + } + if (confidence_ != null) { + output.writeMessage(6, getConfidence()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (timeSegmentStart_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTimeSegmentEnd()); + } + if (confidence_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConfidence()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) + obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasTimeSegmentStart() != other.hasTimeSegmentStart()) return false; + if (hasTimeSegmentStart()) { + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + } + if (hasTimeSegmentEnd() != other.hasTimeSegmentEnd()) return false; + if (hasTimeSegmentEnd()) { + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) return false; + } + if (hasConfidence() != other.hasConfidence()) return false; + if (hasConfidence()) { + if (!getConfidence().equals(other.getConfidence())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasTimeSegmentStart()) { + hash = (37 * hash) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + } + if (hasTimeSegmentEnd()) { + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + } + if (hasConfidence()) { + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + getConfidence().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Video Action Recognition.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult.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(); + id_ = ""; + + displayName_ = ""; + + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + if (confidenceBuilder_ == null) { + confidence_ = null; + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult(this); + result.id_ = id_; + result.displayName_ = displayName_; + if (timeSegmentStartBuilder_ == null) { + result.timeSegmentStart_ = timeSegmentStart_; + } else { + result.timeSegmentStart_ = timeSegmentStartBuilder_.build(); + } + if (timeSegmentEndBuilder_ == null) { + result.timeSegmentEnd_ = timeSegmentEnd_; + } else { + result.timeSegmentEnd_ = timeSegmentEndBuilder_.build(); + } + if (confidenceBuilder_ == null) { + result.confidence_ = confidence_; + } else { + result.confidence_ = confidenceBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasTimeSegmentStart()) { + mergeTimeSegmentStart(other.getTimeSegmentStart()); + } + if (other.hasTimeSegmentEnd()) { + mergeTimeSegmentEnd(other.getTimeSegmentEnd()); + } + if (other.hasConfidence()) { + mergeConfidence(other.getConfidence()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeSegmentStart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentStartBuilder_; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + public boolean hasTimeSegmentStart() { + return timeSegmentStartBuilder_ != null || timeSegmentStart_ != null; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + public com.google.protobuf.Duration getTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } else { + return timeSegmentStartBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentStart_ = value; + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder mergeTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (timeSegmentStart_ != null) { + timeSegmentStart_ = + com.google.protobuf.Duration.newBuilder(timeSegmentStart_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentStart_ = value; + } + onChanged(); + } else { + timeSegmentStartBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder clearTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + onChanged(); + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentStartBuilder() { + + onChanged(); + return getTimeSegmentStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + if (timeSegmentStartBuilder_ != null) { + return timeSegmentStartBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentStartFieldBuilder() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentStart(), getParentForChildren(), isClean()); + timeSegmentStart_ = null; + } + return timeSegmentStartBuilder_; + } + + private com.google.protobuf.Duration timeSegmentEnd_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentEndBuilder_; + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + public boolean hasTimeSegmentEnd() { + return timeSegmentEndBuilder_ != null || timeSegmentEnd_ != null; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + public com.google.protobuf.Duration getTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } else { + return timeSegmentEndBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentEnd_ = value; + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder mergeTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (timeSegmentEnd_ != null) { + timeSegmentEnd_ = + com.google.protobuf.Duration.newBuilder(timeSegmentEnd_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentEnd_ = value; + } + onChanged(); + } else { + timeSegmentEndBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder clearTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + onChanged(); + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentEndBuilder() { + + onChanged(); + return getTimeSegmentEndFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + if (timeSegmentEndBuilder_ != null) { + return timeSegmentEndBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentEndFieldBuilder() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEndBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentEnd(), getParentForChildren(), isClean()); + timeSegmentEnd_ = null; + } + return timeSegmentEndBuilder_; + } + + private com.google.protobuf.FloatValue confidence_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + confidenceBuilder_; + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + public boolean hasConfidence() { + return confidenceBuilder_ != null || confidence_ != null; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + public com.google.protobuf.FloatValue getConfidence() { + if (confidenceBuilder_ == null) { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } else { + return confidenceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder setConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidence_ = value; + onChanged(); + } else { + confidenceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder setConfidence(com.google.protobuf.FloatValue.Builder builderForValue) { + if (confidenceBuilder_ == null) { + confidence_ = builderForValue.build(); + onChanged(); + } else { + confidenceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder mergeConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (confidence_ != null) { + confidence_ = + com.google.protobuf.FloatValue.newBuilder(confidence_) + .mergeFrom(value) + .buildPartial(); + } else { + confidence_ = value; + } + onChanged(); + } else { + confidenceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder clearConfidence() { + if (confidenceBuilder_ == null) { + confidence_ = null; + onChanged(); + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public com.google.protobuf.FloatValue.Builder getConfidenceBuilder() { + + onChanged(); + return getConfidenceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + if (confidenceBuilder_ != null) { + return confidenceBuilder_.getMessageOrBuilder(); + } else { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getConfidenceFieldBuilder() { + if (confidenceBuilder_ == null) { + confidenceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getConfidence(), getParentForChildren(), isClean()); + confidence_ = null; + } + return confidenceBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoActionRecognitionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoActionRecognitionPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java new file mode 100644 index 000000000..da24f5cda --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface VideoActionRecognitionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + boolean hasTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + com.google.protobuf.Duration getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder(); + + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + boolean hasTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + com.google.protobuf.Duration getTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder(); + + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + boolean hasConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + com.google.protobuf.FloatValue getConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java new file mode 100644 index 000000000..66e6f5866 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class VideoActionRecognitionPredictionResultProto { + private VideoActionRecognitionPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nXgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/video_action_recogni" + + "tion.proto\0229google.cloud.aiplatform.v1be" + + "ta1.schema.predict.prediction\032\036google/pr" + + "otobuf/duration.proto\032\036google/protobuf/w" + + "rappers.proto\032\034google/api/annotations.pr" + + "oto\"\347\001\n&VideoActionRecognitionPrediction" + + "Result\022\n\n\002id\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t" + + "\0225\n\022time_segment_start\030\004 \001(\0132\031.google.pr" + + "otobuf.Duration\0223\n\020time_segment_end\030\005 \001(" + + "\0132\031.google.protobuf.Duration\022/\n\nconfiden" + + "ce\030\006 \001(\0132\033.google.protobuf.FloatValueB\323\001" + + "\n=com.google.cloud.aiplatform.v1beta1.sc" + + "hema.predict.predictionB+VideoActionReco" + + "gnitionPredictionResultProtoP\001Zcgoogle.g" + + "olang.org/genproto/googleapis/cloud/aipl" + + "atform/v1beta1/schema/predict/prediction" + + ";predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "TimeSegmentStart", "TimeSegmentEnd", "Confidence", + }); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResult.java new file mode 100644 index 000000000..2a5b76880 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResult.java @@ -0,0 +1,2081 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult} + */ +public final class VideoClassificationPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult) + VideoClassificationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoClassificationPredictionResult.newBuilder() to construct. + private VideoClassificationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoClassificationPredictionResult() { + id_ = ""; + displayName_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoClassificationPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoClassificationPredictionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentStart_ != null) { + subBuilder = timeSegmentStart_.toBuilder(); + } + timeSegmentStart_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentStart_); + timeSegmentStart_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentEnd_ != null) { + subBuilder = timeSegmentEnd_.toBuilder(); + } + timeSegmentEnd_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentEnd_); + timeSegmentEnd_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (confidence_ != null) { + subBuilder = confidence_.toBuilder(); + } + confidence_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(confidence_); + confidence_ = 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = 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_; + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + 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 TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object type_; + /** + * + * + *
+   * The type of the prediction. The requested types can be configured
+   * via parameters. This will be one of
+   * - segment-classification
+   * - shot-classification
+   * - one-sec-interval-classification
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The type of the prediction. The requested types can be configured
+   * via parameters. This will be one of
+   * - segment-classification
+   * - shot-classification
+   * - one-sec-interval-classification
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_SEGMENT_START_FIELD_NUMBER = 4; + private com.google.protobuf.Duration timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentStart() { + return timeSegmentStart_ != null; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentStart() { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + return getTimeSegmentStart(); + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 5; + private com.google.protobuf.Duration timeSegmentEnd_; + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentEnd() { + return timeSegmentEnd_ != null; + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentEnd() { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + return getTimeSegmentEnd(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 6; + private com.google.protobuf.FloatValue confidence_; + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + @java.lang.Override + public boolean hasConfidence() { + return confidence_ != null; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getConfidence() { + return confidence_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : confidence_; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + return getConfidence(); + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + if (timeSegmentStart_ != null) { + output.writeMessage(4, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + output.writeMessage(5, getTimeSegmentEnd()); + } + if (confidence_ != null) { + output.writeMessage(6, getConfidence()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + if (timeSegmentStart_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTimeSegmentEnd()); + } + if (confidence_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConfidence()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult) + obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getType().equals(other.getType())) return false; + if (hasTimeSegmentStart() != other.hasTimeSegmentStart()) return false; + if (hasTimeSegmentStart()) { + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + } + if (hasTimeSegmentEnd() != other.hasTimeSegmentEnd()) return false; + if (hasTimeSegmentEnd()) { + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) return false; + } + if (hasConfidence() != other.hasConfidence()) return false; + if (hasConfidence()) { + if (!getConfidence().equals(other.getConfidence())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (hasTimeSegmentStart()) { + hash = (37 * hash) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + } + if (hasTimeSegmentEnd()) { + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + } + if (hasConfidence()) { + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + getConfidence().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Video Classification.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult.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(); + id_ = ""; + + displayName_ = ""; + + type_ = ""; + + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + if (confidenceBuilder_ == null) { + confidence_ = null; + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult(this); + result.id_ = id_; + result.displayName_ = displayName_; + result.type_ = type_; + if (timeSegmentStartBuilder_ == null) { + result.timeSegmentStart_ = timeSegmentStart_; + } else { + result.timeSegmentStart_ = timeSegmentStartBuilder_.build(); + } + if (timeSegmentEndBuilder_ == null) { + result.timeSegmentEnd_ = timeSegmentEnd_; + } else { + result.timeSegmentEnd_ = timeSegmentEndBuilder_.build(); + } + if (confidenceBuilder_ == null) { + result.confidence_ = confidence_; + } else { + result.confidence_ = confidenceBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.hasTimeSegmentStart()) { + mergeTimeSegmentStart(other.getTimeSegmentStart()); + } + if (other.hasTimeSegmentEnd()) { + mergeTimeSegmentEnd(other.getTimeSegmentEnd()); + } + if (other.hasConfidence()) { + mergeConfidence(other.getConfidence()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + 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 type_ = ""; + /** + * + * + *
+     * The type of the prediction. The requested types can be configured
+     * via parameters. This will be one of
+     * - segment-classification
+     * - shot-classification
+     * - one-sec-interval-classification
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of the prediction. The requested types can be configured
+     * via parameters. This will be one of
+     * - segment-classification
+     * - shot-classification
+     * - one-sec-interval-classification
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of the prediction. The requested types can be configured
+     * via parameters. This will be one of
+     * - segment-classification
+     * - shot-classification
+     * - one-sec-interval-classification
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the prediction. The requested types can be configured
+     * via parameters. This will be one of
+     * - segment-classification
+     * - shot-classification
+     * - one-sec-interval-classification
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the prediction. The requested types can be configured
+     * via parameters. This will be one of
+     * - segment-classification
+     * - shot-classification
+     * - one-sec-interval-classification
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeSegmentStart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentStartBuilder_; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + public boolean hasTimeSegmentStart() { + return timeSegmentStartBuilder_ != null || timeSegmentStart_ != null; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + public com.google.protobuf.Duration getTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } else { + return timeSegmentStartBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentStart_ = value; + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder mergeTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (timeSegmentStart_ != null) { + timeSegmentStart_ = + com.google.protobuf.Duration.newBuilder(timeSegmentStart_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentStart_ = value; + } + onChanged(); + } else { + timeSegmentStartBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public Builder clearTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + onChanged(); + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentStartBuilder() { + + onChanged(); + return getTimeSegmentStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + if (timeSegmentStartBuilder_ != null) { + return timeSegmentStartBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentStart' from the input instance, for other types it is the
+     * start of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentStartFieldBuilder() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentStart(), getParentForChildren(), isClean()); + timeSegmentStart_ = null; + } + return timeSegmentStartBuilder_; + } + + private com.google.protobuf.Duration timeSegmentEnd_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentEndBuilder_; + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + public boolean hasTimeSegmentEnd() { + return timeSegmentEndBuilder_ != null || timeSegmentEnd_ != null; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + public com.google.protobuf.Duration getTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } else { + return timeSegmentEndBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentEnd_ = value; + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder mergeTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (timeSegmentEnd_ != null) { + timeSegmentEnd_ = + com.google.protobuf.Duration.newBuilder(timeSegmentEnd_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentEnd_ = value; + } + onChanged(); + } else { + timeSegmentEndBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public Builder clearTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + onChanged(); + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentEndBuilder() { + + onChanged(); + return getTimeSegmentEndFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + if (timeSegmentEndBuilder_ != null) { + return timeSegmentEndBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + } + /** + * + * + *
+     * The end, exclusive, of the video's time segment in which the
+     * AnnotationSpec has been identified. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end. Note that for
+     * 'segment-classification' prediction type, this equals the original
+     * 'timeSegmentEnd' from the input instance, for other types it is the end
+     * of a shot or a 1 second interval respectively.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentEndFieldBuilder() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEndBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentEnd(), getParentForChildren(), isClean()); + timeSegmentEnd_ = null; + } + return timeSegmentEndBuilder_; + } + + private com.google.protobuf.FloatValue confidence_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + confidenceBuilder_; + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + public boolean hasConfidence() { + return confidenceBuilder_ != null || confidence_ != null; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + public com.google.protobuf.FloatValue getConfidence() { + if (confidenceBuilder_ == null) { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } else { + return confidenceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder setConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidence_ = value; + onChanged(); + } else { + confidenceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder setConfidence(com.google.protobuf.FloatValue.Builder builderForValue) { + if (confidenceBuilder_ == null) { + confidence_ = builderForValue.build(); + onChanged(); + } else { + confidenceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder mergeConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (confidence_ != null) { + confidence_ = + com.google.protobuf.FloatValue.newBuilder(confidence_) + .mergeFrom(value) + .buildPartial(); + } else { + confidence_ = value; + } + onChanged(); + } else { + confidenceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public Builder clearConfidence() { + if (confidenceBuilder_ == null) { + confidence_ = null; + onChanged(); + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public com.google.protobuf.FloatValue.Builder getConfidenceBuilder() { + + onChanged(); + return getConfidenceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + if (confidenceBuilder_ != null) { + return confidenceBuilder_.getMessageOrBuilder(); + } else { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getConfidenceFieldBuilder() { + if (confidenceBuilder_ == null) { + confidenceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getConfidence(), getParentForChildren(), isClean()); + confidence_ = null; + } + return confidenceBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoClassificationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoClassificationPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .VideoClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..5401b9320 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java @@ -0,0 +1,252 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface VideoClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoClassificationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The type of the prediction. The requested types can be configured
+   * via parameters. This will be one of
+   * - segment-classification
+   * - shot-classification
+   * - one-sec-interval-classification
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The type of the prediction. The requested types can be configured
+   * via parameters. This will be one of
+   * - segment-classification
+   * - shot-classification
+   * - one-sec-interval-classification
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return Whether the timeSegmentStart field is set. + */ + boolean hasTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + * + * @return The timeSegmentStart. + */ + com.google.protobuf.Duration getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentStart' from the input instance, for other types it is the
+   * start of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 4; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder(); + + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return Whether the timeSegmentEnd field is set. + */ + boolean hasTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + * + * @return The timeSegmentEnd. + */ + com.google.protobuf.Duration getTimeSegmentEnd(); + /** + * + * + *
+   * The end, exclusive, of the video's time segment in which the
+   * AnnotationSpec has been identified. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end. Note that for
+   * 'segment-classification' prediction type, this equals the original
+   * 'timeSegmentEnd' from the input instance, for other types it is the end
+   * of a shot or a 1 second interval respectively.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 5; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder(); + + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return Whether the confidence field is set. + */ + boolean hasConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + * + * @return The confidence. + */ + com.google.protobuf.FloatValue getConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 6; + */ + com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultProto.java new file mode 100644 index 000000000..0efcf23c3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class VideoClassificationPredictionResultProto { + private VideoClassificationPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nTgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/video_classification" + + ".proto\0229google.cloud.aiplatform.v1beta1." + + "schema.predict.prediction\032\036google/protob" + + "uf/duration.proto\032\036google/protobuf/wrapp" + + "ers.proto\032\034google/api/annotations.proto\"" + + "\362\001\n#VideoClassificationPredictionResult\022" + + "\n\n\002id\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\014\n\004typ" + + "e\030\003 \001(\t\0225\n\022time_segment_start\030\004 \001(\0132\031.go" + + "ogle.protobuf.Duration\0223\n\020time_segment_e" + + "nd\030\005 \001(\0132\031.google.protobuf.Duration\022/\n\nc" + + "onfidence\030\006 \001(\0132\033.google.protobuf.FloatV" + + "alueB\320\001\n=com.google.cloud.aiplatform.v1b" + + "eta1.schema.predict.predictionB(VideoCla" + + "ssificationPredictionResultProtoP\001Zcgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "aiplatform/v1beta1/schema/predict/predic" + + "tion;predictionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "Type", "TimeSegmentStart", "TimeSegmentEnd", "Confidence", + }); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java new file mode 100644 index 000000000..0b8f81c42 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java @@ -0,0 +1,4536 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult} + */ +public final class VideoObjectTrackingPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + VideoObjectTrackingPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoObjectTrackingPredictionResult.newBuilder() to construct. + private VideoObjectTrackingPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoObjectTrackingPredictionResult() { + id_ = ""; + displayName_ = ""; + frames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoObjectTrackingPredictionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoObjectTrackingPredictionResult( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentStart_ != null) { + subBuilder = timeSegmentStart_.toBuilder(); + } + timeSegmentStart_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentStart_); + timeSegmentStart_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeSegmentEnd_ != null) { + subBuilder = timeSegmentEnd_.toBuilder(); + } + timeSegmentEnd_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegmentEnd_); + timeSegmentEnd_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (confidence_ != null) { + subBuilder = confidence_.toBuilder(); + } + confidence_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(confidence_); + confidence_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame>(); + mutable_bitField0_ |= 0x00000001; + } + frames_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Builder.class); + } + + public interface FrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return Whether the timeOffset field is set. + */ + boolean hasTimeOffset(); + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return The timeOffset. + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); + + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return Whether the xMin field is set. + */ + boolean hasXMin(); + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return The xMin. + */ + com.google.protobuf.FloatValue getXMin(); + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + com.google.protobuf.FloatValueOrBuilder getXMinOrBuilder(); + + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return Whether the xMax field is set. + */ + boolean hasXMax(); + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return The xMax. + */ + com.google.protobuf.FloatValue getXMax(); + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + com.google.protobuf.FloatValueOrBuilder getXMaxOrBuilder(); + + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return Whether the yMin field is set. + */ + boolean hasYMin(); + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return The yMin. + */ + com.google.protobuf.FloatValue getYMin(); + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + com.google.protobuf.FloatValueOrBuilder getYMinOrBuilder(); + + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return Whether the yMax field is set. + */ + boolean hasYMax(); + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return The yMax. + */ + com.google.protobuf.FloatValue getYMax(); + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + com.google.protobuf.FloatValueOrBuilder getYMaxOrBuilder(); + } + /** + * + * + *
+   * The fields `xMin`, `xMax`, `yMin`, and `yMax` refer to a bounding box,
+   * i.e. the rectangle over the video frame pinpointing the found
+   * AnnotationSpec. The coordinates are relative to the frame size, and the
+   * point 0,0 is in the top left of the frame.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame} + */ + public static final class Frame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + FrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use Frame.newBuilder() to construct. + private Frame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Frame() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Frame(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Frame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (xMin_ != null) { + subBuilder = xMin_.toBuilder(); + } + xMin_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(xMin_); + xMin_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (xMax_ != null) { + subBuilder = xMax_.toBuilder(); + } + xMax_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(xMax_); + xMax_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (yMin_ != null) { + subBuilder = yMin_.toBuilder(); + } + yMin_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(yMin_); + yMin_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (yMax_ != null) { + subBuilder = yMax_.toBuilder(); + } + yMax_ = + input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(yMax_); + yMax_ = 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder.class); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return Whether the timeOffset field is set. + */ + @java.lang.Override + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return The timeOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+     * A time (frame) of a video in which the object has been detected.
+     * Expressed as a number of seconds as measured from the
+     * start of the video, with fractions up to a microsecond precision, and
+     * with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + public static final int X_MIN_FIELD_NUMBER = 2; + private com.google.protobuf.FloatValue xMin_; + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return Whether the xMin field is set. + */ + @java.lang.Override + public boolean hasXMin() { + return xMin_ != null; + } + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return The xMin. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getXMin() { + return xMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMin_; + } + /** + * + * + *
+     * The leftmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getXMinOrBuilder() { + return getXMin(); + } + + public static final int X_MAX_FIELD_NUMBER = 3; + private com.google.protobuf.FloatValue xMax_; + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return Whether the xMax field is set. + */ + @java.lang.Override + public boolean hasXMax() { + return xMax_ != null; + } + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return The xMax. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getXMax() { + return xMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMax_; + } + /** + * + * + *
+     * The rightmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getXMaxOrBuilder() { + return getXMax(); + } + + public static final int Y_MIN_FIELD_NUMBER = 4; + private com.google.protobuf.FloatValue yMin_; + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return Whether the yMin field is set. + */ + @java.lang.Override + public boolean hasYMin() { + return yMin_ != null; + } + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return The yMin. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getYMin() { + return yMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMin_; + } + /** + * + * + *
+     * The topmost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getYMinOrBuilder() { + return getYMin(); + } + + public static final int Y_MAX_FIELD_NUMBER = 5; + private com.google.protobuf.FloatValue yMax_; + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return Whether the yMax field is set. + */ + @java.lang.Override + public boolean hasYMax() { + return yMax_ != null; + } + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return The yMax. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getYMax() { + return yMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMax_; + } + /** + * + * + *
+     * The bottommost coordinate of the bounding box.
+     * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getYMaxOrBuilder() { + return getYMax(); + } + + 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 (timeOffset_ != null) { + output.writeMessage(1, getTimeOffset()); + } + if (xMin_ != null) { + output.writeMessage(2, getXMin()); + } + if (xMax_ != null) { + output.writeMessage(3, getXMax()); + } + if (yMin_ != null) { + output.writeMessage(4, getYMin()); + } + if (yMax_ != null) { + output.writeMessage(5, getYMax()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeOffset()); + } + if (xMin_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getXMin()); + } + if (xMax_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getXMax()); + } + if (yMin_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getYMin()); + } + if (yMax_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getYMax()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) + obj; + + if (hasTimeOffset() != other.hasTimeOffset()) return false; + if (hasTimeOffset()) { + if (!getTimeOffset().equals(other.getTimeOffset())) return false; + } + if (hasXMin() != other.hasXMin()) return false; + if (hasXMin()) { + if (!getXMin().equals(other.getXMin())) return false; + } + if (hasXMax() != other.hasXMax()) return false; + if (hasXMax()) { + if (!getXMax().equals(other.getXMax())) return false; + } + if (hasYMin() != other.hasYMin()) return false; + if (hasYMin()) { + if (!getYMin().equals(other.getYMin())) return false; + } + if (hasYMax() != other.hasYMax()) return false; + if (hasYMax()) { + if (!getYMax().equals(other.getYMax())) 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 (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + if (hasXMin()) { + hash = (37 * hash) + X_MIN_FIELD_NUMBER; + hash = (53 * hash) + getXMin().hashCode(); + } + if (hasXMax()) { + hash = (37 * hash) + X_MAX_FIELD_NUMBER; + hash = (53 * hash) + getXMax().hashCode(); + } + if (hasYMin()) { + hash = (37 * hash) + Y_MIN_FIELD_NUMBER; + hash = (53 * hash) + getYMin().hashCode(); + } + if (hasYMax()) { + hash = (37 * hash) + Y_MAX_FIELD_NUMBER; + hash = (53 * hash) + getYMax().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + 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 fields `xMin`, `xMax`, `yMin`, and `yMax` refer to a bounding box,
+     * i.e. the rectangle over the video frame pinpointing the found
+     * AnnotationSpec. The coordinates are relative to the frame size, and the
+     * point 0,0 is in the top left of the frame.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame.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 (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + if (xMinBuilder_ == null) { + xMin_ = null; + } else { + xMin_ = null; + xMinBuilder_ = null; + } + if (xMaxBuilder_ == null) { + xMax_ = null; + } else { + xMax_ = null; + xMaxBuilder_ = null; + } + if (yMinBuilder_ == null) { + yMin_ = null; + } else { + yMin_ = null; + yMinBuilder_ = null; + } + if (yMaxBuilder_ == null) { + yMax_ = null; + } else { + yMax_ = null; + yMaxBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame(this); + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + if (xMinBuilder_ == null) { + result.xMin_ = xMin_; + } else { + result.xMin_ = xMinBuilder_.build(); + } + if (xMaxBuilder_ == null) { + result.xMax_ = xMax_; + } else { + result.xMax_ = xMaxBuilder_.build(); + } + if (yMinBuilder_ == null) { + result.yMin_ = yMin_; + } else { + result.yMin_ = yMinBuilder_.build(); + } + if (yMaxBuilder_ == null) { + result.yMax_ = yMax_; + } else { + result.yMax_ = yMaxBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.getDefaultInstance()) return this; + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + if (other.hasXMin()) { + mergeXMin(other.getXMin()); + } + if (other.hasXMax()) { + mergeXMax(other.getXMax()); + } + if (other.hasYMin()) { + mergeYMin(other.getYMin()); + } + if (other.hasYMax()) { + mergeYMax(other.getYMax()); + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration timeOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return Whether the timeOffset field is set. + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + * + * @return The timeOffset. + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_) + .mergeFrom(value) + .buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+       * A time (frame) of a video in which the object has been detected.
+       * Expressed as a number of seconds as measured from the
+       * start of the video, with fractions up to a microsecond precision, and
+       * with "s" appended at the end.
+       * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + private com.google.protobuf.FloatValue xMin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + xMinBuilder_; + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return Whether the xMin field is set. + */ + public boolean hasXMin() { + return xMinBuilder_ != null || xMin_ != null; + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + * + * @return The xMin. + */ + public com.google.protobuf.FloatValue getXMin() { + if (xMinBuilder_ == null) { + return xMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMin_; + } else { + return xMinBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public Builder setXMin(com.google.protobuf.FloatValue value) { + if (xMinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + xMin_ = value; + onChanged(); + } else { + xMinBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public Builder setXMin(com.google.protobuf.FloatValue.Builder builderForValue) { + if (xMinBuilder_ == null) { + xMin_ = builderForValue.build(); + onChanged(); + } else { + xMinBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public Builder mergeXMin(com.google.protobuf.FloatValue value) { + if (xMinBuilder_ == null) { + if (xMin_ != null) { + xMin_ = + com.google.protobuf.FloatValue.newBuilder(xMin_).mergeFrom(value).buildPartial(); + } else { + xMin_ = value; + } + onChanged(); + } else { + xMinBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public Builder clearXMin() { + if (xMinBuilder_ == null) { + xMin_ = null; + onChanged(); + } else { + xMin_ = null; + xMinBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public com.google.protobuf.FloatValue.Builder getXMinBuilder() { + + onChanged(); + return getXMinFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + public com.google.protobuf.FloatValueOrBuilder getXMinOrBuilder() { + if (xMinBuilder_ != null) { + return xMinBuilder_.getMessageOrBuilder(); + } else { + return xMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMin_; + } + } + /** + * + * + *
+       * The leftmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_min = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getXMinFieldBuilder() { + if (xMinBuilder_ == null) { + xMinBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getXMin(), getParentForChildren(), isClean()); + xMin_ = null; + } + return xMinBuilder_; + } + + private com.google.protobuf.FloatValue xMax_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + xMaxBuilder_; + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return Whether the xMax field is set. + */ + public boolean hasXMax() { + return xMaxBuilder_ != null || xMax_ != null; + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + * + * @return The xMax. + */ + public com.google.protobuf.FloatValue getXMax() { + if (xMaxBuilder_ == null) { + return xMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMax_; + } else { + return xMaxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public Builder setXMax(com.google.protobuf.FloatValue value) { + if (xMaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + xMax_ = value; + onChanged(); + } else { + xMaxBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public Builder setXMax(com.google.protobuf.FloatValue.Builder builderForValue) { + if (xMaxBuilder_ == null) { + xMax_ = builderForValue.build(); + onChanged(); + } else { + xMaxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public Builder mergeXMax(com.google.protobuf.FloatValue value) { + if (xMaxBuilder_ == null) { + if (xMax_ != null) { + xMax_ = + com.google.protobuf.FloatValue.newBuilder(xMax_).mergeFrom(value).buildPartial(); + } else { + xMax_ = value; + } + onChanged(); + } else { + xMaxBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public Builder clearXMax() { + if (xMaxBuilder_ == null) { + xMax_ = null; + onChanged(); + } else { + xMax_ = null; + xMaxBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public com.google.protobuf.FloatValue.Builder getXMaxBuilder() { + + onChanged(); + return getXMaxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + public com.google.protobuf.FloatValueOrBuilder getXMaxOrBuilder() { + if (xMaxBuilder_ != null) { + return xMaxBuilder_.getMessageOrBuilder(); + } else { + return xMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : xMax_; + } + } + /** + * + * + *
+       * The rightmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue x_max = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getXMaxFieldBuilder() { + if (xMaxBuilder_ == null) { + xMaxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getXMax(), getParentForChildren(), isClean()); + xMax_ = null; + } + return xMaxBuilder_; + } + + private com.google.protobuf.FloatValue yMin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + yMinBuilder_; + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return Whether the yMin field is set. + */ + public boolean hasYMin() { + return yMinBuilder_ != null || yMin_ != null; + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + * + * @return The yMin. + */ + public com.google.protobuf.FloatValue getYMin() { + if (yMinBuilder_ == null) { + return yMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMin_; + } else { + return yMinBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public Builder setYMin(com.google.protobuf.FloatValue value) { + if (yMinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + yMin_ = value; + onChanged(); + } else { + yMinBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public Builder setYMin(com.google.protobuf.FloatValue.Builder builderForValue) { + if (yMinBuilder_ == null) { + yMin_ = builderForValue.build(); + onChanged(); + } else { + yMinBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public Builder mergeYMin(com.google.protobuf.FloatValue value) { + if (yMinBuilder_ == null) { + if (yMin_ != null) { + yMin_ = + com.google.protobuf.FloatValue.newBuilder(yMin_).mergeFrom(value).buildPartial(); + } else { + yMin_ = value; + } + onChanged(); + } else { + yMinBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public Builder clearYMin() { + if (yMinBuilder_ == null) { + yMin_ = null; + onChanged(); + } else { + yMin_ = null; + yMinBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public com.google.protobuf.FloatValue.Builder getYMinBuilder() { + + onChanged(); + return getYMinFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + public com.google.protobuf.FloatValueOrBuilder getYMinOrBuilder() { + if (yMinBuilder_ != null) { + return yMinBuilder_.getMessageOrBuilder(); + } else { + return yMin_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMin_; + } + } + /** + * + * + *
+       * The topmost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_min = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getYMinFieldBuilder() { + if (yMinBuilder_ == null) { + yMinBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getYMin(), getParentForChildren(), isClean()); + yMin_ = null; + } + return yMinBuilder_; + } + + private com.google.protobuf.FloatValue yMax_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + yMaxBuilder_; + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return Whether the yMax field is set. + */ + public boolean hasYMax() { + return yMaxBuilder_ != null || yMax_ != null; + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + * + * @return The yMax. + */ + public com.google.protobuf.FloatValue getYMax() { + if (yMaxBuilder_ == null) { + return yMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMax_; + } else { + return yMaxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public Builder setYMax(com.google.protobuf.FloatValue value) { + if (yMaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + yMax_ = value; + onChanged(); + } else { + yMaxBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public Builder setYMax(com.google.protobuf.FloatValue.Builder builderForValue) { + if (yMaxBuilder_ == null) { + yMax_ = builderForValue.build(); + onChanged(); + } else { + yMaxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public Builder mergeYMax(com.google.protobuf.FloatValue value) { + if (yMaxBuilder_ == null) { + if (yMax_ != null) { + yMax_ = + com.google.protobuf.FloatValue.newBuilder(yMax_).mergeFrom(value).buildPartial(); + } else { + yMax_ = value; + } + onChanged(); + } else { + yMaxBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public Builder clearYMax() { + if (yMaxBuilder_ == null) { + yMax_ = null; + onChanged(); + } else { + yMax_ = null; + yMaxBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public com.google.protobuf.FloatValue.Builder getYMaxBuilder() { + + onChanged(); + return getYMaxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + public com.google.protobuf.FloatValueOrBuilder getYMaxOrBuilder() { + if (yMaxBuilder_ != null) { + return yMaxBuilder_.getMessageOrBuilder(); + } else { + return yMax_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : yMax_; + } + } + /** + * + * + *
+       * The bottommost coordinate of the bounding box.
+       * 
+ * + * .google.protobuf.FloatValue y_max = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getYMaxFieldBuilder() { + if (yMaxBuilder_ == null) { + yMaxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getYMax(), getParentForChildren(), isClean()); + yMax_ = null; + } + return yMaxBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Frame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Frame(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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = 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_; + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + 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 TIME_SEGMENT_START_FIELD_NUMBER = 3; + private com.google.protobuf.Duration timeSegmentStart_; + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return Whether the timeSegmentStart field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentStart() { + return timeSegmentStart_ != null; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentStart() { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + return getTimeSegmentStart(); + } + + public static final int TIME_SEGMENT_END_FIELD_NUMBER = 4; + private com.google.protobuf.Duration timeSegmentEnd_; + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return Whether the timeSegmentEnd field is set. + */ + @java.lang.Override + public boolean hasTimeSegmentEnd() { + return timeSegmentEnd_ != null; + } + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeSegmentEnd() { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + return getTimeSegmentEnd(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private com.google.protobuf.FloatValue confidence_; + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return Whether the confidence field is set. + */ + @java.lang.Override + public boolean hasConfidence() { + return confidence_ != null; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return The confidence. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getConfidence() { + return confidence_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : confidence_; + } + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + return getConfidence(); + } + + public static final int FRAMES_FIELD_NUMBER = 6; + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + frames_; + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + getFramesList() { + return frames_; + } + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + getFramesOrBuilderList() { + return frames_; + } + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public int getFramesCount() { + return frames_.size(); + } + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getFrames(int index) { + return frames_.get(index); + } + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder + getFramesOrBuilder(int index) { + return frames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (timeSegmentStart_ != null) { + output.writeMessage(3, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + output.writeMessage(4, getTimeSegmentEnd()); + } + if (confidence_ != null) { + output.writeMessage(5, getConfidence()); + } + for (int i = 0; i < frames_.size(); i++) { + output.writeMessage(6, frames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (timeSegmentStart_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimeSegmentStart()); + } + if (timeSegmentEnd_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimeSegmentEnd()); + } + if (confidence_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getConfidence()); + } + for (int i = 0; i < frames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, frames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + other = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) + obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasTimeSegmentStart() != other.hasTimeSegmentStart()) return false; + if (hasTimeSegmentStart()) { + if (!getTimeSegmentStart().equals(other.getTimeSegmentStart())) return false; + } + if (hasTimeSegmentEnd() != other.hasTimeSegmentEnd()) return false; + if (hasTimeSegmentEnd()) { + if (!getTimeSegmentEnd().equals(other.getTimeSegmentEnd())) return false; + } + if (hasConfidence() != other.hasConfidence()) return false; + if (hasConfidence()) { + if (!getConfidence().equals(other.getConfidence())) return false; + } + if (!getFramesList().equals(other.getFramesList())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasTimeSegmentStart()) { + hash = (37 * hash) + TIME_SEGMENT_START_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentStart().hashCode(); + } + if (hasTimeSegmentEnd()) { + hash = (37 * hash) + TIME_SEGMENT_END_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegmentEnd().hashCode(); + } + if (hasConfidence()) { + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + getConfidence().hashCode(); + } + if (getFramesCount() > 0) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFramesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + 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; + } + /** + * + * + *
+   * Prediction output format for Video Object Tracking.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.class, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + displayName_ = ""; + + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + if (confidenceBuilder_ == null) { + confidence_ = null; + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + framesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + build() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + result = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.displayName_ = displayName_; + if (timeSegmentStartBuilder_ == null) { + result.timeSegmentStart_ = timeSegmentStart_; + } else { + result.timeSegmentStart_ = timeSegmentStartBuilder_.build(); + } + if (timeSegmentEndBuilder_ == null) { + result.timeSegmentEnd_ = timeSegmentEnd_; + } else { + result.timeSegmentEnd_ = timeSegmentEndBuilder_.build(); + } + if (confidenceBuilder_ == null) { + result.confidence_ = confidence_; + } else { + result.confidence_ = confidenceBuilder_.build(); + } + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.frames_ = frames_; + } else { + result.frames_ = framesBuilder_.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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasTimeSegmentStart()) { + mergeTimeSegmentStart(other.getTimeSegmentStart()); + } + if (other.hasTimeSegmentEnd()) { + mergeTimeSegmentEnd(other.getTimeSegmentEnd()); + } + if (other.hasConfidence()) { + mergeConfidence(other.getConfidence()); + } + if (framesBuilder_ == null) { + if (!other.frames_.isEmpty()) { + if (frames_.isEmpty()) { + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFramesIsMutable(); + frames_.addAll(other.frames_); + } + onChanged(); + } + } else { + if (!other.frames_.isEmpty()) { + if (framesBuilder_.isEmpty()) { + framesBuilder_.dispose(); + framesBuilder_ = null; + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000001); + framesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesFieldBuilder() + : null; + } else { + framesBuilder_.addAllMessages(other.frames_); + } + } + } + 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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of the AnnotationSpec that had been identified.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the AnnotationSpec that had been identified.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeSegmentStart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentStartBuilder_; + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return Whether the timeSegmentStart field is set. + */ + public boolean hasTimeSegmentStart() { + return timeSegmentStartBuilder_ != null || timeSegmentStart_ != null; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + public com.google.protobuf.Duration getTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } else { + return timeSegmentStartBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentStart_ = value; + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public Builder setTimeSegmentStart(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentStartBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public Builder mergeTimeSegmentStart(com.google.protobuf.Duration value) { + if (timeSegmentStartBuilder_ == null) { + if (timeSegmentStart_ != null) { + timeSegmentStart_ = + com.google.protobuf.Duration.newBuilder(timeSegmentStart_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentStart_ = value; + } + onChanged(); + } else { + timeSegmentStartBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public Builder clearTimeSegmentStart() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStart_ = null; + onChanged(); + } else { + timeSegmentStart_ = null; + timeSegmentStartBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentStartBuilder() { + + onChanged(); + return getTimeSegmentStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder() { + if (timeSegmentStartBuilder_ != null) { + return timeSegmentStartBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentStart_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentStart_; + } + } + /** + * + * + *
+     * The beginning, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentStartFieldBuilder() { + if (timeSegmentStartBuilder_ == null) { + timeSegmentStartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentStart(), getParentForChildren(), isClean()); + timeSegmentStart_ = null; + } + return timeSegmentStartBuilder_; + } + + private com.google.protobuf.Duration timeSegmentEnd_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeSegmentEndBuilder_; + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return Whether the timeSegmentEnd field is set. + */ + public boolean hasTimeSegmentEnd() { + return timeSegmentEndBuilder_ != null || timeSegmentEnd_ != null; + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + public com.google.protobuf.Duration getTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } else { + return timeSegmentEndBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegmentEnd_ = value; + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public Builder setTimeSegmentEnd(com.google.protobuf.Duration.Builder builderForValue) { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentEndBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public Builder mergeTimeSegmentEnd(com.google.protobuf.Duration value) { + if (timeSegmentEndBuilder_ == null) { + if (timeSegmentEnd_ != null) { + timeSegmentEnd_ = + com.google.protobuf.Duration.newBuilder(timeSegmentEnd_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegmentEnd_ = value; + } + onChanged(); + } else { + timeSegmentEndBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public Builder clearTimeSegmentEnd() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEnd_ = null; + onChanged(); + } else { + timeSegmentEnd_ = null; + timeSegmentEndBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public com.google.protobuf.Duration.Builder getTimeSegmentEndBuilder() { + + onChanged(); + return getTimeSegmentEndFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + public com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder() { + if (timeSegmentEndBuilder_ != null) { + return timeSegmentEndBuilder_.getMessageOrBuilder(); + } else { + return timeSegmentEnd_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeSegmentEnd_; + } + } + /** + * + * + *
+     * The end, inclusive, of the video's time segment in which the
+     * object instance has been detected. Expressed as a number of seconds as
+     * measured from the start of the video, with fractions up to a microsecond
+     * precision, and with "s" appended at the end.
+     * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeSegmentEndFieldBuilder() { + if (timeSegmentEndBuilder_ == null) { + timeSegmentEndBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeSegmentEnd(), getParentForChildren(), isClean()); + timeSegmentEnd_ = null; + } + return timeSegmentEndBuilder_; + } + + private com.google.protobuf.FloatValue confidence_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + confidenceBuilder_; + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return Whether the confidence field is set. + */ + public boolean hasConfidence() { + return confidenceBuilder_ != null || confidence_ != null; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return The confidence. + */ + public com.google.protobuf.FloatValue getConfidence() { + if (confidenceBuilder_ == null) { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } else { + return confidenceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public Builder setConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidence_ = value; + onChanged(); + } else { + confidenceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public Builder setConfidence(com.google.protobuf.FloatValue.Builder builderForValue) { + if (confidenceBuilder_ == null) { + confidence_ = builderForValue.build(); + onChanged(); + } else { + confidenceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public Builder mergeConfidence(com.google.protobuf.FloatValue value) { + if (confidenceBuilder_ == null) { + if (confidence_ != null) { + confidence_ = + com.google.protobuf.FloatValue.newBuilder(confidence_) + .mergeFrom(value) + .buildPartial(); + } else { + confidence_ = value; + } + onChanged(); + } else { + confidenceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public Builder clearConfidence() { + if (confidenceBuilder_ == null) { + confidence_ = null; + onChanged(); + } else { + confidence_ = null; + confidenceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public com.google.protobuf.FloatValue.Builder getConfidenceBuilder() { + + onChanged(); + return getConfidenceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + public com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder() { + if (confidenceBuilder_ != null) { + return confidenceBuilder_.getMessageOrBuilder(); + } else { + return confidence_ == null + ? com.google.protobuf.FloatValue.getDefaultInstance() + : confidence_; + } + } + /** + * + * + *
+     * The Model's confidence in correction of this prediction, higher
+     * value means higher confidence.
+     * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder> + getConfidenceFieldBuilder() { + if (confidenceBuilder_ == null) { + confidenceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FloatValue, + com.google.protobuf.FloatValue.Builder, + com.google.protobuf.FloatValueOrBuilder>( + getConfidence(), getParentForChildren(), isClean()); + confidence_ = null; + } + return confidenceBuilder_; + } + + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + frames_ = java.util.Collections.emptyList(); + + private void ensureFramesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame>(frames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + framesBuilder_; + + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + getFramesList() { + if (framesBuilder_ == null) { + return java.util.Collections.unmodifiableList(frames_); + } else { + return framesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public int getFramesCount() { + if (framesBuilder_ == null) { + return frames_.size(); + } else { + return framesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getFrames(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder setFrames( + int index, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.set(index, value); + onChanged(); + } else { + framesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder setFrames( + int index, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.set(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(value); + onChanged(); + } else { + framesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + int index, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(index, value); + onChanged(); + } else { + framesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + int index, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addAllFrames( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + values) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frames_); + onChanged(); + } else { + framesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder clearFrames() { + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + framesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder removeFrames(int index) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.remove(index); + onChanged(); + } else { + framesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + getFramesBuilder(int index) { + return getFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder + getFramesOrBuilder(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + getFramesOrBuilderList() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frames_); + } + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.getDefaultInstance()); + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + addFramesBuilder(int index) { + return getFramesFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.getDefaultInstance()); + } + /** + * + * + *
+     * All of the frames of the video in which a single object instance has been
+     * detected. The bounding boxes in the frames identify the same object.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder> + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder>( + frames_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + frames_ = null; + } + return framesBuilder_; + } + + @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.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + private static final com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoObjectTrackingPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoObjectTrackingPredictionResult(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.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java new file mode 100644 index 000000000..8b855babe --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java @@ -0,0 +1,278 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public interface VideoObjectTrackingPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The resource ID of the AnnotationSpec that had been identified.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the AnnotationSpec that had been identified.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return Whether the timeSegmentStart field is set. + */ + boolean hasTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + * + * @return The timeSegmentStart. + */ + com.google.protobuf.Duration getTimeSegmentStart(); + /** + * + * + *
+   * The beginning, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_start = 3; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentStartOrBuilder(); + + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return Whether the timeSegmentEnd field is set. + */ + boolean hasTimeSegmentEnd(); + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + * + * @return The timeSegmentEnd. + */ + com.google.protobuf.Duration getTimeSegmentEnd(); + /** + * + * + *
+   * The end, inclusive, of the video's time segment in which the
+   * object instance has been detected. Expressed as a number of seconds as
+   * measured from the start of the video, with fractions up to a microsecond
+   * precision, and with "s" appended at the end.
+   * 
+ * + * .google.protobuf.Duration time_segment_end = 4; + */ + com.google.protobuf.DurationOrBuilder getTimeSegmentEndOrBuilder(); + + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return Whether the confidence field is set. + */ + boolean hasConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + * + * @return The confidence. + */ + com.google.protobuf.FloatValue getConfidence(); + /** + * + * + *
+   * The Model's confidence in correction of this prediction, higher
+   * value means higher confidence.
+   * 
+ * + * .google.protobuf.FloatValue confidence = 5; + */ + com.google.protobuf.FloatValueOrBuilder getConfidenceOrBuilder(); + + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame> + getFramesList(); + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .Frame + getFrames(int index); + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + int getFramesCount(); + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + getFramesOrBuilderList(); + /** + * + * + *
+   * All of the frames of the video in which a single object instance has been
+   * detected. The bounding boxes in the frames identify the same object.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .FrameOrBuilder + getFramesOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java new file mode 100644 index 000000000..68188818b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +public final class VideoObjectTrackingPredictionResultProto { + private VideoObjectTrackingPredictionResultProto() {} + + 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_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nUgoogle/cloud/aiplatform/v1beta1/schema" + + "/predict/prediction/video_object_trackin" + + "g.proto\0229google.cloud.aiplatform.v1beta1" + + ".schema.predict.prediction\032\036google/proto" + + "buf/duration.proto\032\036google/protobuf/wrap" + + "pers.proto\032\034google/api/annotations.proto" + + "\"\304\004\n#VideoObjectTrackingPredictionResult" + + "\022\n\n\002id\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\0225\n\022ti" + + "me_segment_start\030\003 \001(\0132\031.google.protobuf" + + ".Duration\0223\n\020time_segment_end\030\004 \001(\0132\031.go" + + "ogle.protobuf.Duration\022/\n\nconfidence\030\005 \001" + + "(\0132\033.google.protobuf.FloatValue\022t\n\006frame" + + "s\030\006 \003(\0132d.google.cloud.aiplatform.v1beta" + + "1.schema.predict.prediction.VideoObjectT" + + "rackingPredictionResult.Frame\032\347\001\n\005Frame\022" + + ".\n\013time_offset\030\001 \001(\0132\031.google.protobuf.D" + + "uration\022*\n\005x_min\030\002 \001(\0132\033.google.protobuf" + + ".FloatValue\022*\n\005x_max\030\003 \001(\0132\033.google.prot" + + "obuf.FloatValue\022*\n\005y_min\030\004 \001(\0132\033.google." + + "protobuf.FloatValue\022*\n\005y_max\030\005 \001(\0132\033.goo" + + "gle.protobuf.FloatValueB\320\001\n=com.google.c" + + "loud.aiplatform.v1beta1.schema.predict.p" + + "redictionB(VideoObjectTrackingPrediction" + + "ResultProtoP\001Zcgoogle.golang.org/genprot" + + "o/googleapis/cloud/aiplatform/v1beta1/sc" + + "hema/predict/prediction;predictionb\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "TimeSegmentStart", "TimeSegmentEnd", "Confidence", "Frames", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor, + new java.lang.String[] { + "TimeOffset", "XMin", "XMax", "YMin", "YMax", + }); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLForecastingProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLForecastingProto.java new file mode 100644 index 000000000..bfe702064 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLForecastingProto.java @@ -0,0 +1,337 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLForecastingProto { + private AutoMLForecastingProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nVgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_forecasti" + + "ng.proto\022=google.cloud.aiplatform.v1beta" + + "1.schema.trainingjob.definition\032fgoogle/" + + "cloud/aiplatform/v1beta1/schema/training" + + "job/definition/export_evaluated_data_ite" + + "ms_config.proto\032\034google/api/annotations." + + "proto\"\347\001\n\021AutoMlForecasting\022f\n\006inputs\030\001 " + + "\001(\0132V.google.cloud.aiplatform.v1beta1.sc" + + "hema.trainingjob.definition.AutoMlForeca" + + "stingInputs\022j\n\010metadata\030\002 \001(\0132X.google.c" + + "loud.aiplatform.v1beta1.schema.trainingj" + + "ob.definition.AutoMlForecastingMetadata\"" + + "\206\024\n\027AutoMlForecastingInputs\022\025\n\rtarget_co" + + "lumn\030\001 \001(\t\022%\n\035time_series_identifier_col" + + "umn\030\002 \001(\t\022\023\n\013time_column\030\003 \001(\t\022~\n\017transf" + + "ormations\030\004 \003(\0132e.google.cloud.aiplatfor" + + "m.v1beta1.schema.trainingjob.definition." + + "AutoMlForecastingInputs.Transformation\022\036" + + "\n\026optimization_objective\030\005 \001(\t\022%\n\035train_" + + "budget_milli_node_hours\030\006 \001(\003\022\025\n\rweight_" + + "column\030\007 \001(\t\022\026\n\016static_columns\030\010 \003(\t\022&\n\036" + + "time_variant_past_only_columns\030\t \003(\t\022,\n$" + + "time_variant_past_and_future_columns\030\n \003" + + "(\t\022m\n\006period\030\013 \001(\0132].google.cloud.aiplat" + + "form.v1beta1.schema.trainingjob.definiti" + + "on.AutoMlForecastingInputs.Period\022\035\n\025for" + + "ecast_window_start\030\014 \001(\003\022\033\n\023forecast_win" + + "dow_end\030\r \001(\003\022\024\n\014past_horizon\030\016 \001(\003\022\211\001\n\"" + + "export_evaluated_data_items_config\030\017 \001(\013" + + "2].google.cloud.aiplatform.v1beta1.schem" + + "a.trainingjob.definition.ExportEvaluated" + + "DataItemsConfig\032\324\r\n\016Transformation\022\210\001\n\004a" + + "uto\030\001 \001(\0132x.google.cloud.aiplatform.v1be" + + "ta1.schema.trainingjob.definition.AutoMl" + + "ForecastingInputs.Transformation.AutoTra" + + "nsformationH\000\022\216\001\n\007numeric\030\002 \001(\0132{.google" + + ".cloud.aiplatform.v1beta1.schema.trainin" + + "gjob.definition.AutoMlForecastingInputs." + + "Transformation.NumericTransformationH\000\022\226" + + "\001\n\013categorical\030\003 \001(\0132\177.google.cloud.aipl" + + "atform.v1beta1.schema.trainingjob.defini" + + "tion.AutoMlForecastingInputs.Transformat" + + "ion.CategoricalTransformationH\000\022\222\001\n\ttime" + + "stamp\030\004 \001(\0132}.google.cloud.aiplatform.v1" + + "beta1.schema.trainingjob.definition.Auto" + + "MlForecastingInputs.Transformation.Times" + + "tampTransformationH\000\022\210\001\n\004text\030\005 \001(\0132x.go" + + "ogle.cloud.aiplatform.v1beta1.schema.tra" + + "iningjob.definition.AutoMlForecastingInp" + + "uts.Transformation.TextTransformationH\000\022" + + "\235\001\n\020repeated_numeric\030\006 \001(\0132\200\001.google.clo" + + "ud.aiplatform.v1beta1.schema.trainingjob" + + ".definition.AutoMlForecastingInputs.Tran" + + "sformation.NumericArrayTransformationH\000\022" + + "\245\001\n\024repeated_categorical\030\007 \001(\0132\204\001.google" + + ".cloud.aiplatform.v1beta1.schema.trainin" + + "gjob.definition.AutoMlForecastingInputs." + + "Transformation.CategoricalArrayTransform" + + "ationH\000\022\226\001\n\rrepeated_text\030\010 \001(\0132}.google" + + ".cloud.aiplatform.v1beta1.schema.trainin" + + "gjob.definition.AutoMlForecastingInputs." + + "Transformation.TextArrayTransformationH\000" + + "\032)\n\022AutoTransformation\022\023\n\013column_name\030\001 " + + "\001(\t\032L\n\025NumericTransformation\022\023\n\013column_n" + + "ame\030\001 \001(\t\022\036\n\026invalid_values_allowed\030\002 \001(" + + "\010\0320\n\031CategoricalTransformation\022\023\n\013column" + + "_name\030\001 \001(\t\032c\n\027TimestampTransformation\022\023" + + "\n\013column_name\030\001 \001(\t\022\023\n\013time_format\030\002 \001(\t" + + "\022\036\n\026invalid_values_allowed\030\003 \001(\010\032)\n\022Text" + + "Transformation\022\023\n\013column_name\030\001 \001(\t\032Q\n\032N" + + "umericArrayTransformation\022\023\n\013column_name" + + "\030\001 \001(\t\022\036\n\026invalid_values_allowed\030\002 \001(\010\0325" + + "\n\036CategoricalArrayTransformation\022\023\n\013colu" + + "mn_name\030\001 \001(\t\032.\n\027TextArrayTransformation" + + "\022\023\n\013column_name\030\001 \001(\tB\027\n\025transformation_" + + "detail\032(\n\006Period\022\014\n\004unit\030\001 \001(\t\022\020\n\010quanti" + + "ty\030\002 \001(\003\"@\n\031AutoMlForecastingMetadata\022#\n" + + "\033train_cost_milli_node_hours\030\001 \001(\003B\306\001\nAc" + + "om.google.cloud.aiplatform.v1beta1.schem" + + "a.trainingjob.definitionB\026AutoMLForecast" + + "ingProtoP\001Zggoogle.golang.org/genproto/g" + + "oogleapis/cloud/aiplatform/v1beta1/schem" + + "a/trainingjob/definition;definitionb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor, + new java.lang.String[] { + "TargetColumn", + "TimeSeriesIdentifierColumn", + "TimeColumn", + "Transformations", + "OptimizationObjective", + "TrainBudgetMilliNodeHours", + "WeightColumn", + "StaticColumns", + "TimeVariantPastOnlyColumns", + "TimeVariantPastAndFutureColumns", + "Period", + "ForecastWindowStart", + "ForecastWindowEnd", + "PastHorizon", + "ExportEvaluatedDataItemsConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor, + new java.lang.String[] { + "Auto", + "Numeric", + "Categorical", + "Timestamp", + "Text", + "RepeatedNumeric", + "RepeatedCategorical", + "RepeatedText", + "TransformationDetail", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "TimeFormat", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor, + new java.lang.String[] { + "Unit", "Quantity", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor, + new java.lang.String[] { + "TrainCostMilliNodeHours", + }); + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageClassificationProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageClassificationProto.java new file mode 100644 index 000000000..019268156 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageClassificationProto.java @@ -0,0 +1,127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLImageClassificationProto { + private AutoMLImageClassificationProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_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/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_image_cla" + + "ssification.proto\022=google.cloud.aiplatfo" + + "rm.v1beta1.schema.trainingjob.definition" + + "\032\034google/api/annotations.proto\"\377\001\n\031AutoM" + + "lImageClassification\022n\n\006inputs\030\001 \001(\0132^.g" + + "oogle.cloud.aiplatform.v1beta1.schema.tr" + + "ainingjob.definition.AutoMlImageClassifi" + + "cationInputs\022r\n\010metadata\030\002 \001(\0132`.google." + + "cloud.aiplatform.v1beta1.schema.training" + + "job.definition.AutoMlImageClassification" + + "Metadata\"\230\003\n\037AutoMlImageClassificationIn" + + "puts\022|\n\nmodel_type\030\001 \001(\0162h.google.cloud." + + "aiplatform.v1beta1.schema.trainingjob.de" + + "finition.AutoMlImageClassificationInputs" + + ".ModelType\022\025\n\rbase_model_id\030\002 \001(\t\022\037\n\027bud" + + "get_milli_node_hours\030\003 \001(\003\022\036\n\026disable_ea" + + "rly_stopping\030\004 \001(\010\022\023\n\013multi_label\030\005 \001(\010\"" + + "\211\001\n\tModelType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020" + + "\000\022\t\n\005CLOUD\020\001\022\033\n\027MOBILE_TF_LOW_LATENCY_1\020" + + "\002\022\031\n\025MOBILE_TF_VERSATILE_1\020\003\022\035\n\031MOBILE_T" + + "F_HIGH_ACCURACY_1\020\004\"\303\002\n!AutoMlImageClass" + + "ificationMetadata\022\035\n\025cost_milli_node_hou" + + "rs\030\001 \001(\003\022\225\001\n\026successful_stop_reason\030\002 \001(" + + "\0162u.google.cloud.aiplatform.v1beta1.sche" + + "ma.trainingjob.definition.AutoMlImageCla" + + "ssificationMetadata.SuccessfulStopReason" + + "\"g\n\024SuccessfulStopReason\022&\n\"SUCCESSFUL_S" + + "TOP_REASON_UNSPECIFIED\020\000\022\022\n\016BUDGET_REACH" + + "ED\020\001\022\023\n\017MODEL_CONVERGED\020\002B\316\001\nAcom.google" + + ".cloud.aiplatform.v1beta1.schema.trainin" + + "gjob.definitionB\036AutoMLImageClassificati" + + "onProtoP\001Zggoogle.golang.org/genproto/go" + + "ogleapis/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition;definitionb\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor, + new java.lang.String[] { + "ModelType", + "BaseModelId", + "BudgetMilliNodeHours", + "DisableEarlyStopping", + "MultiLabel", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor, + new java.lang.String[] { + "CostMilliNodeHours", "SuccessfulStopReason", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java new file mode 100644 index 000000000..f53fc0fec --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLImageObjectDetectionProto { + private AutoMLImageObjectDetectionProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nagoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_image_obj" + + "ect_detection.proto\022=google.cloud.aiplat" + + "form.v1beta1.schema.trainingjob.definiti" + + "on\032\034google/api/annotations.proto\"\202\002\n\032Aut" + + "oMlImageObjectDetection\022o\n\006inputs\030\001 \001(\0132" + + "_.google.cloud.aiplatform.v1beta1.schema" + + ".trainingjob.definition.AutoMlImageObjec" + + "tDetectionInputs\022s\n\010metadata\030\002 \001(\0132a.goo" + + "gle.cloud.aiplatform.v1beta1.schema.trai" + + "ningjob.definition.AutoMlImageObjectDete" + + "ctionMetadata\"\227\003\n AutoMlImageObjectDetec" + + "tionInputs\022}\n\nmodel_type\030\001 \001(\0162i.google." + + "cloud.aiplatform.v1beta1.schema.training" + + "job.definition.AutoMlImageObjectDetectio" + + "nInputs.ModelType\022\037\n\027budget_milli_node_h" + + "ours\030\002 \001(\003\022\036\n\026disable_early_stopping\030\003 \001" + + "(\010\"\262\001\n\tModelType\022\032\n\026MODEL_TYPE_UNSPECIFI" + + "ED\020\000\022\031\n\025CLOUD_HIGH_ACCURACY_1\020\001\022\027\n\023CLOUD" + + "_LOW_LATENCY_1\020\002\022\033\n\027MOBILE_TF_LOW_LATENC" + + "Y_1\020\003\022\031\n\025MOBILE_TF_VERSATILE_1\020\004\022\035\n\031MOBI" + + "LE_TF_HIGH_ACCURACY_1\020\005\"\305\002\n\"AutoMlImageO" + + "bjectDetectionMetadata\022\035\n\025cost_milli_nod" + + "e_hours\030\001 \001(\003\022\226\001\n\026successful_stop_reason" + + "\030\002 \001(\0162v.google.cloud.aiplatform.v1beta1" + + ".schema.trainingjob.definition.AutoMlIma" + + "geObjectDetectionMetadata.SuccessfulStop" + + "Reason\"g\n\024SuccessfulStopReason\022&\n\"SUCCES" + + "SFUL_STOP_REASON_UNSPECIFIED\020\000\022\022\n\016BUDGET" + + "_REACHED\020\001\022\023\n\017MODEL_CONVERGED\020\002B\317\001\nAcom." + + "google.cloud.aiplatform.v1beta1.schema.t" + + "rainingjob.definitionB\037AutoMLImageObject" + + "DetectionProtoP\001Zggoogle.golang.org/genp" + + "roto/googleapis/cloud/aiplatform/v1beta1" + + "/schema/trainingjob/definition;definitio" + + "nb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor, + new java.lang.String[] { + "ModelType", "BudgetMilliNodeHours", "DisableEarlyStopping", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor, + new java.lang.String[] { + "CostMilliNodeHours", "SuccessfulStopReason", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageSegmentationProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageSegmentationProto.java new file mode 100644 index 000000000..57280f26b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageSegmentationProto.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLImageSegmentationProto { + private AutoMLImageSegmentationProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_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/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_image_seg" + + "mentation.proto\022=google.cloud.aiplatform" + + ".v1beta1.schema.trainingjob.definition\032\034" + + "google/api/annotations.proto\"\371\001\n\027AutoMlI" + + "mageSegmentation\022l\n\006inputs\030\001 \001(\0132\\.googl" + + "e.cloud.aiplatform.v1beta1.schema.traini" + + "ngjob.definition.AutoMlImageSegmentation" + + "Inputs\022p\n\010metadata\030\002 \001(\0132^.google.cloud." + + "aiplatform.v1beta1.schema.trainingjob.de" + + "finition.AutoMlImageSegmentationMetadata" + + "\"\261\002\n\035AutoMlImageSegmentationInputs\022z\n\nmo" + + "del_type\030\001 \001(\0162f.google.cloud.aiplatform" + + ".v1beta1.schema.trainingjob.definition.A" + + "utoMlImageSegmentationInputs.ModelType\022\037" + + "\n\027budget_milli_node_hours\030\002 \001(\003\022\025\n\rbase_" + + "model_id\030\003 \001(\t\"\\\n\tModelType\022\032\n\026MODEL_TYP" + + "E_UNSPECIFIED\020\000\022\031\n\025CLOUD_HIGH_ACCURACY_1" + + "\020\001\022\030\n\024CLOUD_LOW_ACCURACY_1\020\002\"\277\002\n\037AutoMlI" + + "mageSegmentationMetadata\022\035\n\025cost_milli_n" + + "ode_hours\030\001 \001(\003\022\223\001\n\026successful_stop_reas" + + "on\030\002 \001(\0162s.google.cloud.aiplatform.v1bet" + + "a1.schema.trainingjob.definition.AutoMlI" + + "mageSegmentationMetadata.SuccessfulStopR" + + "eason\"g\n\024SuccessfulStopReason\022&\n\"SUCCESS" + + "FUL_STOP_REASON_UNSPECIFIED\020\000\022\022\n\016BUDGET_" + + "REACHED\020\001\022\023\n\017MODEL_CONVERGED\020\002B\314\001\nAcom.g" + + "oogle.cloud.aiplatform.v1beta1.schema.tr" + + "ainingjob.definitionB\034AutoMLImageSegment" + + "ationProtoP\001Zggoogle.golang.org/genproto" + + "/googleapis/cloud/aiplatform/v1beta1/sch" + + "ema/trainingjob/definition;definitionb\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor, + new java.lang.String[] { + "ModelType", "BudgetMilliNodeHours", "BaseModelId", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor, + new java.lang.String[] { + "CostMilliNodeHours", "SuccessfulStopReason", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTablesProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTablesProto.java new file mode 100644 index 000000000..c96798be8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTablesProto.java @@ -0,0 +1,311 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLTablesProto { + private AutoMLTablesProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nQgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_tables.pr" + + "oto\022=google.cloud.aiplatform.v1beta1.sch" + + "ema.trainingjob.definition\032fgoogle/cloud" + + "/aiplatform/v1beta1/schema/trainingjob/d" + + "efinition/export_evaluated_data_items_co" + + "nfig.proto\032\034google/api/annotations.proto" + + "\"\330\001\n\014AutoMlTables\022a\n\006inputs\030\001 \001(\0132Q.goog" + + "le.cloud.aiplatform.v1beta1.schema.train" + + "ingjob.definition.AutoMlTablesInputs\022e\n\010" + + "metadata\030\002 \001(\0132S.google.cloud.aiplatform" + + ".v1beta1.schema.trainingjob.definition.A" + + "utoMlTablesMetadata\"\210\022\n\022AutoMlTablesInpu" + + "ts\022-\n#optimization_objective_recall_valu" + + "e\030\005 \001(\002H\000\0220\n&optimization_objective_prec" + + "ision_value\030\006 \001(\002H\000\022\027\n\017prediction_type\030\001" + + " \001(\t\022\025\n\rtarget_column\030\002 \001(\t\022y\n\017transform" + + "ations\030\003 \003(\0132`.google.cloud.aiplatform.v" + + "1beta1.schema.trainingjob.definition.Aut" + + "oMlTablesInputs.Transformation\022\036\n\026optimi" + + "zation_objective\030\004 \001(\t\022%\n\035train_budget_m" + + "illi_node_hours\030\007 \001(\003\022\036\n\026disable_early_s" + + "topping\030\010 \001(\010\022\032\n\022weight_column_name\030\t \001(" + + "\t\022\211\001\n\"export_evaluated_data_items_config" + + "\030\n \001(\0132].google.cloud.aiplatform.v1beta1" + + ".schema.trainingjob.definition.ExportEva" + + "luatedDataItemsConfig\032\252\r\n\016Transformation" + + "\022\203\001\n\004auto\030\001 \001(\0132s.google.cloud.aiplatfor" + + "m.v1beta1.schema.trainingjob.definition." + + "AutoMlTablesInputs.Transformation.AutoTr" + + "ansformationH\000\022\211\001\n\007numeric\030\002 \001(\0132v.googl" + + "e.cloud.aiplatform.v1beta1.schema.traini" + + "ngjob.definition.AutoMlTablesInputs.Tran" + + "sformation.NumericTransformationH\000\022\221\001\n\013c" + + "ategorical\030\003 \001(\0132z.google.cloud.aiplatfo" + + "rm.v1beta1.schema.trainingjob.definition" + + ".AutoMlTablesInputs.Transformation.Categ" + + "oricalTransformationH\000\022\215\001\n\ttimestamp\030\004 \001" + + "(\0132x.google.cloud.aiplatform.v1beta1.sch" + + "ema.trainingjob.definition.AutoMlTablesI" + + "nputs.Transformation.TimestampTransforma" + + "tionH\000\022\203\001\n\004text\030\005 \001(\0132s.google.cloud.aip" + + "latform.v1beta1.schema.trainingjob.defin" + + "ition.AutoMlTablesInputs.Transformation." + + "TextTransformationH\000\022\227\001\n\020repeated_numeri" + + "c\030\006 \001(\0132{.google.cloud.aiplatform.v1beta" + + "1.schema.trainingjob.definition.AutoMlTa" + + "blesInputs.Transformation.NumericArrayTr" + + "ansformationH\000\022\237\001\n\024repeated_categorical\030" + + "\007 \001(\0132\177.google.cloud.aiplatform.v1beta1." + + "schema.trainingjob.definition.AutoMlTabl" + + "esInputs.Transformation.CategoricalArray" + + "TransformationH\000\022\221\001\n\rrepeated_text\030\010 \001(\013" + + "2x.google.cloud.aiplatform.v1beta1.schem" + + "a.trainingjob.definition.AutoMlTablesInp" + + "uts.Transformation.TextArrayTransformati" + + "onH\000\032)\n\022AutoTransformation\022\023\n\013column_nam" + + "e\030\001 \001(\t\032L\n\025NumericTransformation\022\023\n\013colu" + + "mn_name\030\001 \001(\t\022\036\n\026invalid_values_allowed\030" + + "\002 \001(\010\0320\n\031CategoricalTransformation\022\023\n\013co" + + "lumn_name\030\001 \001(\t\032c\n\027TimestampTransformati" + + "on\022\023\n\013column_name\030\001 \001(\t\022\023\n\013time_format\030\002" + + " \001(\t\022\036\n\026invalid_values_allowed\030\003 \001(\010\032)\n\022" + + "TextTransformation\022\023\n\013column_name\030\001 \001(\t\032" + + "Q\n\032NumericArrayTransformation\022\023\n\013column_" + + "name\030\001 \001(\t\022\036\n\026invalid_values_allowed\030\002 \001" + + "(\010\0325\n\036CategoricalArrayTransformation\022\023\n\013" + + "column_name\030\001 \001(\t\032.\n\027TextArrayTransforma" + + "tion\022\023\n\013column_name\030\001 \001(\tB\027\n\025transformat" + + "ion_detailB*\n(additional_optimization_ob" + + "jective_config\";\n\024AutoMlTablesMetadata\022#" + + "\n\033train_cost_milli_node_hours\030\001 \001(\003B\301\001\nA" + + "com.google.cloud.aiplatform.v1beta1.sche" + + "ma.trainingjob.definitionB\021AutoMLTablesP" + + "rotoP\001Zggoogle.golang.org/genproto/googl" + + "eapis/cloud/aiplatform/v1beta1/schema/tr" + + "ainingjob/definition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor, + new java.lang.String[] { + "OptimizationObjectiveRecallValue", + "OptimizationObjectivePrecisionValue", + "PredictionType", + "TargetColumn", + "Transformations", + "OptimizationObjective", + "TrainBudgetMilliNodeHours", + "DisableEarlyStopping", + "WeightColumnName", + "ExportEvaluatedDataItemsConfig", + "AdditionalOptimizationObjectiveConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor, + new java.lang.String[] { + "Auto", + "Numeric", + "Categorical", + "Timestamp", + "Text", + "RepeatedNumeric", + "RepeatedCategorical", + "RepeatedText", + "TransformationDetail", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "TimeFormat", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", "InvalidValuesAllowed", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor, + new java.lang.String[] { + "ColumnName", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor, + new java.lang.String[] { + "TrainCostMilliNodeHours", + }); + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextClassificationProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextClassificationProto.java new file mode 100644 index 000000000..43d7c9884 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextClassificationProto.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLTextClassificationProto { + private AutoMLTextClassificationProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_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/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_text_clas" + + "sification.proto\022=google.cloud.aiplatfor" + + "m.v1beta1.schema.trainingjob.definition\032" + + "\034google/api/annotations.proto\"\211\001\n\030AutoMl" + + "TextClassification\022m\n\006inputs\030\001 \001(\0132].goo" + + "gle.cloud.aiplatform.v1beta1.schema.trai" + + "ningjob.definition.AutoMlTextClassificat" + + "ionInputs\"5\n\036AutoMlTextClassificationInp" + + "uts\022\023\n\013multi_label\030\001 \001(\010B\315\001\nAcom.google." + + "cloud.aiplatform.v1beta1.schema.training" + + "job.definitionB\035AutoMLTextClassification" + + "ProtoP\001Zggoogle.golang.org/genproto/goog" + + "leapis/cloud/aiplatform/v1beta1/schema/t" + + "rainingjob/definition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor, + new java.lang.String[] { + "MultiLabel", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextExtractionProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextExtractionProto.java new file mode 100644 index 000000000..02d828280 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextExtractionProto.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLTextExtractionProto { + private AutoMLTextExtractionProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nZgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_text_extr" + + "action.proto\022=google.cloud.aiplatform.v1" + + "beta1.schema.trainingjob.definition\032\034goo" + + "gle/api/annotations.proto\"\201\001\n\024AutoMlText" + + "Extraction\022i\n\006inputs\030\001 \001(\0132Y.google.clou" + + "d.aiplatform.v1beta1.schema.trainingjob." + + "definition.AutoMlTextExtractionInputs\"\034\n" + + "\032AutoMlTextExtractionInputsB\311\001\nAcom.goog" + + "le.cloud.aiplatform.v1beta1.schema.train" + + "ingjob.definitionB\031AutoMLTextExtractionP" + + "rotoP\001Zggoogle.golang.org/genproto/googl" + + "eapis/cloud/aiplatform/v1beta1/schema/tr" + + "ainingjob/definition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor, + new java.lang.String[] {}); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextSentimentProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextSentimentProto.java new file mode 100644 index 000000000..b00d3b9db --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextSentimentProto.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLTextSentimentProto { + private AutoMLTextSentimentProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nYgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_text_sent" + + "iment.proto\022=google.cloud.aiplatform.v1b" + + "eta1.schema.trainingjob.definition\032\034goog" + + "le/api/annotations.proto\"\177\n\023AutoMlTextSe" + + "ntiment\022h\n\006inputs\030\001 \001(\0132X.google.cloud.a" + + "iplatform.v1beta1.schema.trainingjob.def" + + "inition.AutoMlTextSentimentInputs\"2\n\031Aut" + + "oMlTextSentimentInputs\022\025\n\rsentiment_max\030" + + "\001 \001(\005B\310\001\nAcom.google.cloud.aiplatform.v1" + + "beta1.schema.trainingjob.definitionB\030Aut" + + "oMLTextSentimentProtoP\001Zggoogle.golang.o" + + "rg/genproto/googleapis/cloud/aiplatform/" + + "v1beta1/schema/trainingjob/definition;de" + + "finitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor, + new java.lang.String[] { + "SentimentMax", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoActionRecognitionProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoActionRecognitionProto.java new file mode 100644 index 000000000..b202b17ca --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoActionRecognitionProto.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLVideoActionRecognitionProto { + private AutoMLVideoActionRecognitionProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\ncgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_video_act" + + "ion_recognition.proto\022=google.cloud.aipl" + + "atform.v1beta1.schema.trainingjob.defini" + + "tion\032\034google/api/annotations.proto\"\221\001\n\034A" + + "utoMlVideoActionRecognition\022q\n\006inputs\030\001 " + + "\001(\0132a.google.cloud.aiplatform.v1beta1.sc" + + "hema.trainingjob.definition.AutoMlVideoA" + + "ctionRecognitionInputs\"\361\001\n\"AutoMlVideoAc" + + "tionRecognitionInputs\022\177\n\nmodel_type\030\001 \001(" + + "\0162k.google.cloud.aiplatform.v1beta1.sche" + + "ma.trainingjob.definition.AutoMlVideoAct" + + "ionRecognitionInputs.ModelType\"J\n\tModelT" + + "ype\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\t\n\005CLOUD" + + "\020\001\022\026\n\022MOBILE_VERSATILE_1\020\002B\321\001\nAcom.googl" + + "e.cloud.aiplatform.v1beta1.schema.traini" + + "ngjob.definitionB!AutoMLVideoActionRecog" + + "nitionProtoP\001Zggoogle.golang.org/genprot" + + "o/googleapis/cloud/aiplatform/v1beta1/sc" + + "hema/trainingjob/definition;definitionb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor, + new java.lang.String[] { + "ModelType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoClassificationProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoClassificationProto.java new file mode 100644 index 000000000..42e5320e8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoClassificationProto.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLVideoClassificationProto { + private AutoMLVideoClassificationProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_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/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_video_cla" + + "ssification.proto\022=google.cloud.aiplatfo" + + "rm.v1beta1.schema.trainingjob.definition" + + "\032\034google/api/annotations.proto\"\213\001\n\031AutoM" + + "lVideoClassification\022n\n\006inputs\030\001 \001(\0132^.g" + + "oogle.cloud.aiplatform.v1beta1.schema.tr" + + "ainingjob.definition.AutoMlVideoClassifi" + + "cationInputs\"\353\001\n\037AutoMlVideoClassificati" + + "onInputs\022|\n\nmodel_type\030\001 \001(\0162h.google.cl" + + "oud.aiplatform.v1beta1.schema.trainingjo" + + "b.definition.AutoMlVideoClassificationIn" + + "puts.ModelType\"J\n\tModelType\022\032\n\026MODEL_TYP" + + "E_UNSPECIFIED\020\000\022\t\n\005CLOUD\020\001\022\026\n\022MOBILE_VER" + + "SATILE_1\020\002B\316\001\nAcom.google.cloud.aiplatfo" + + "rm.v1beta1.schema.trainingjob.definition" + + "B\036AutoMLVideoClassificationProtoP\001Zggoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "aiplatform/v1beta1/schema/trainingjob/de" + + "finition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor, + new java.lang.String[] { + "ModelType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoObjectTrackingProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoObjectTrackingProto.java new file mode 100644 index 000000000..6cea61557 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoObjectTrackingProto.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class AutoMLVideoObjectTrackingProto { + private AutoMLVideoObjectTrackingProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_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/aiplatform/v1beta1/schema" + + "/trainingjob/definition/automl_video_obj" + + "ect_tracking.proto\022=google.cloud.aiplatf" + + "orm.v1beta1.schema.trainingjob.definitio" + + "n\032\034google/api/annotations.proto\"\213\001\n\031Auto" + + "MlVideoObjectTracking\022n\n\006inputs\030\001 \001(\0132^." + + "google.cloud.aiplatform.v1beta1.schema.t" + + "rainingjob.definition.AutoMlVideoObjectT" + + "rackingInputs\"\352\002\n\037AutoMlVideoObjectTrack" + + "ingInputs\022|\n\nmodel_type\030\001 \001(\0162h.google.c" + + "loud.aiplatform.v1beta1.schema.trainingj" + + "ob.definition.AutoMlVideoObjectTrackingI" + + "nputs.ModelType\"\310\001\n\tModelType\022\032\n\026MODEL_T" + + "YPE_UNSPECIFIED\020\000\022\t\n\005CLOUD\020\001\022\026\n\022MOBILE_V" + + "ERSATILE_1\020\002\022\034\n\030MOBILE_CORAL_VERSATILE_1" + + "\020\003\022\036\n\032MOBILE_CORAL_LOW_LATENCY_1\020\004\022\035\n\031MO" + + "BILE_JETSON_VERSATILE_1\020\005\022\037\n\033MOBILE_JETS" + + "ON_LOW_LATENCY_1\020\006B\316\001\nAcom.google.cloud." + + "aiplatform.v1beta1.schema.trainingjob.de" + + "finitionB\036AutoMLVideoObjectTrackingProto" + + "P\001Zggoogle.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1beta1/schema/traini" + + "ngjob/definition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor, + new java.lang.String[] { + "Inputs", + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor, + new java.lang.String[] { + "ModelType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecasting.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecasting.java new file mode 100644 index 000000000..a665f4d99 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecasting.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Forecasting Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting} + */ +public final class AutoMlForecasting extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + AutoMlForecastingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlForecasting.newBuilder() to construct. + private AutoMlForecasting(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlForecasting() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlForecasting(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlForecasting( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + 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 TrainingJob that trains and uploads an AutoML Forecasting Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecasting_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting( + this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + .getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + .Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecasting + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlForecasting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlForecasting(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputs.java new file mode 100644 index 000000000..f5563cd03 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputs.java @@ -0,0 +1,14769 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs} + */ +public final class AutoMlForecastingInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs) + AutoMlForecastingInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlForecastingInputs.newBuilder() to construct. + private AutoMlForecastingInputs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlForecastingInputs() { + targetColumn_ = ""; + timeSeriesIdentifierColumn_ = ""; + timeColumn_ = ""; + transformations_ = java.util.Collections.emptyList(); + optimizationObjective_ = ""; + weightColumn_ = ""; + staticColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + timeVariantPastOnlyColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + timeVariantPastAndFutureColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlForecastingInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlForecastingInputs( + 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(); + + targetColumn_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeSeriesIdentifierColumn_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeColumn_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation>(); + mutable_bitField0_ |= 0x00000001; + } + transformations_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.parser(), + extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + optimizationObjective_ = s; + break; + } + case 48: + { + trainBudgetMilliNodeHours_ = input.readInt64(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + weightColumn_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + staticColumns_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + staticColumns_.add(s); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + timeVariantPastOnlyColumns_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + timeVariantPastOnlyColumns_.add(s); + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + timeVariantPastAndFutureColumns_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + timeVariantPastAndFutureColumns_.add(s); + break; + } + case 90: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder + subBuilder = null; + if (period_ != null) { + subBuilder = period_.toBuilder(); + } + period_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(period_); + period_ = subBuilder.buildPartial(); + } + + break; + } + case 96: + { + forecastWindowStart_ = input.readInt64(); + break; + } + case 104: + { + forecastWindowEnd_ = input.readInt64(); + break; + } + case 112: + { + pastHorizon_ = input.readInt64(); + break; + } + case 122: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + subBuilder = null; + if (exportEvaluatedDataItemsConfig_ != null) { + subBuilder = exportEvaluatedDataItemsConfig_.toBuilder(); + } + exportEvaluatedDataItemsConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(exportEvaluatedDataItemsConfig_); + exportEvaluatedDataItemsConfig_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + staticColumns_ = staticColumns_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + timeVariantPastOnlyColumns_ = timeVariantPastOnlyColumns_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + timeVariantPastAndFutureColumns_ = timeVariantPastAndFutureColumns_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder.class); + } + + public interface TransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + boolean hasAuto(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + getAuto(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + boolean hasNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + getNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + boolean hasCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + getCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + getTimestamp(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + getText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + boolean hasRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + boolean hasRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + boolean hasRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + getRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder(); + + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TransformationDetailCase + getTransformationDetailCase(); + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation} + */ + public static final class Transformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation) + TransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transformation.newBuilder() to construct. + private Transformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transformation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 1; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 4; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 5) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 5; + break; + } + case 50: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 6) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + .NumericArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 6; + break; + } + case 58: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .Builder + subBuilder = null; + if (transformationDetailCase_ == 7) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + .CategoricalArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + .CategoricalArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 7; + break; + } + case 66: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 8) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 8; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder.class); + } + + public interface AutoTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will infer the proper transformation based on the
+     * statistic of dataset.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation} + */ + public static final class AutoTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation) + AutoTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoTransformation.newBuilder() to construct. + private AutoTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will infer the proper transformation based on the
+       * statistic of dataset.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The value converted to float32.
+     * *  The z_score of the value.
+     * *  log(value+1) when the value is greater than or equal to 0. Otherwise,
+     *    this transformation is not applied and the value is considered a
+     *    missing value.
+     * *  z_score of log(value+1) when the value is greater than or equal to 0.
+     *    Otherwise, this transformation is not applied and the value is
+     *    considered a missing value.
+     * *  A boolean value that indicates whether the value is valid.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation} + */ + public static final class NumericTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation) + NumericTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericTransformation.newBuilder() to construct. + private NumericTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 16: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 2; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(2, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The value converted to float32.
+       * *  The z_score of the value.
+       * *  log(value+1) when the value is greater than or equal to 0. Otherwise,
+       *    this transformation is not applied and the value is considered a
+       *    missing value.
+       * *  z_score of log(value+1) when the value is greater than or equal to 0.
+       *    Otherwise, this transformation is not applied and the value is
+       *    considered a missing value.
+       * *  A boolean value that indicates whether the value is valid.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation.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(); + columnName_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation(this); + result.columnName_ = columnName_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The categorical string as is--no change to case, punctuation,
+     * spelling,
+     *    tense, and so on.
+     * *  Convert the category name to a dictionary lookup index and generate an
+     *    embedding for each index.
+     * *  Categories that appear less than 5 times in the training dataset are
+     *    treated as the "unknown" category. The "unknown" category gets its own
+     *    special lookup index and resulting embedding.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation} + */ + public static final class CategoricalTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation) + CategoricalTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalTransformation.newBuilder() to construct. + private CategoricalTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder + .class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The categorical string as is--no change to case, punctuation,
+       * spelling,
+       *    tense, and so on.
+       * *  Convert the category name to a dictionary lookup index and generate an
+       *    embedding for each index.
+       * *  Categories that appear less than 5 times in the training dataset are
+       *    treated as the "unknown" category. The "unknown" category gets its own
+       *    special lookup index and resulting embedding.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimestampTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + java.lang.String getTimeFormat(); + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + com.google.protobuf.ByteString getTimeFormatBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  Apply the transformation functions for Numerical columns.
+     * *  Determine the year, month, day,and weekday. Treat each value from the
+     * *  timestamp as a Categorical column.
+     * *  Invalid numerical values (for example, values that fall outside of a
+     *    typical timestamp range, or are extreme values) receive no special
+     *    treatment and are not removed.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation} + */ + public static final class TimestampTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation) + TimestampTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimestampTransformation.newBuilder() to construct. + private TimestampTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimestampTransformation() { + columnName_ = ""; + timeFormat_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimestampTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimestampTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeFormat_ = s; + break; + } + case 24: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FORMAT_FIELD_NUMBER = 2; + private volatile java.lang.Object timeFormat_; + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + @java.lang.Override + public java.lang.String getTimeFormat() { + java.lang.Object ref = timeFormat_; + 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(); + timeFormat_ = s; + return s; + } + } + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeFormatBytes() { + java.lang.Object ref = timeFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 3; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (!getTimeFormatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeFormat_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(3, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (!getTimeFormatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeFormat_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (!getTimeFormat().equals(other.getTimeFormat())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + TIME_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getTimeFormat().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  Apply the transformation functions for Numerical columns.
+       * *  Determine the year, month, day,and weekday. Treat each value from the
+       * *  timestamp as a Categorical column.
+       * *  Invalid numerical values (for example, values that fall outside of a
+       *    typical timestamp range, or are extreme values) receive no special
+       *    treatment and are not removed.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation.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(); + columnName_ = ""; + + timeFormat_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation(this); + result.columnName_ = columnName_; + result.timeFormat_ = timeFormat_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (!other.getTimeFormat().isEmpty()) { + timeFormat_ = other.timeFormat_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeFormat_ = ""; + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + public java.lang.String getTimeFormat() { + java.lang.Object ref = timeFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + public com.google.protobuf.ByteString getTimeFormatBytes() { + java.lang.Object ref = timeFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @param value The timeFormat to set. + * @return This builder for chaining. + */ + public Builder setTimeFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return This builder for chaining. + */ + public Builder clearTimeFormat() { + + timeFormat_ = getDefaultInstance().getTimeFormat(); + onChanged(); + return this; + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @param value The bytes for timeFormat to set. + * @return This builder for chaining. + */ + public Builder setTimeFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeFormat_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimestampTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimestampTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The text as is--no change to case, punctuation, spelling, tense, and
+     * so
+     *    on.
+     * *  Tokenize text to words. Convert each words to a dictionary lookup
+     * index
+     *    and generate an embedding for each index. Combine the embedding of all
+     *    elements into a single embedding using the mean.
+     * *  Tokenization is based on unicode script boundaries.
+     * *  Missing values get their own lookup index and resulting embedding.
+     * *  Stop-words receive no special treatment and are not removed.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation} + */ + public static final class TextTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation) + TextTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextTransformation.newBuilder() to construct. + private TextTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The text as is--no change to case, punctuation, spelling, tense, and
+       * so
+       *    on.
+       * *  Tokenize text to words. Convert each words to a dictionary lookup
+       * index
+       *    and generate an embedding for each index. Combine the embedding of all
+       *    elements into a single embedding using the mean.
+       * *  Tokenization is based on unicode script boundaries.
+       * *  Missing values get their own lookup index and resulting embedding.
+       * *  Stop-words receive no special treatment and are not removed.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Treats the column as numerical array and performs following
+     * transformation functions.
+     * *  All transformations for Numerical types applied to the average of the
+     *    all elements.
+     * *  The average of empty arrays is treated as zero.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation} + */ + public static final class NumericArrayTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + NumericArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericArrayTransformation.newBuilder() to construct. + private NumericArrayTransformation( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 16: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder + .class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 2; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(2, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as numerical array and performs following
+       * transformation functions.
+       * *  All transformations for Numerical types applied to the average of the
+       *    all elements.
+       * *  The average of empty arrays is treated as zero.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation.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(); + columnName_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation(this); + result.columnName_ = columnName_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Treats the column as categorical array and performs following
+     * transformation functions.
+     * *  For each element in the array, convert the category name to a
+     * dictionary
+     *    lookup index and generate an embedding for each index.
+     *    Combine the embedding of all elements into a single embedding using
+     *    the mean.
+     * *  Empty arrays treated as an embedding of zeroes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation} + */ + public static final class CategoricalArrayTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + CategoricalArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalArrayTransformation.newBuilder() to construct. + private CategoricalArrayTransformation( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.Builder + .class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as categorical array and performs following
+       * transformation functions.
+       * *  For each element in the array, convert the category name to a
+       * dictionary
+       *    lookup index and generate an embedding for each index.
+       *    Combine the embedding of all elements into a single embedding using
+       *    the mean.
+       * *  Empty arrays treated as an embedding of zeroes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Treats the column as text array and performs following transformation
+     * functions.
+     * *  Concatenate all text values in the array into a single text value
+     * using
+     *    a space (" ") as a delimiter, and then treat the result as a single
+     *    text value. Apply the transformations for Text columns.
+     * *  Empty arrays treated as an empty text.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation} + */ + public static final class TextArrayTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation) + TextArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextArrayTransformation.newBuilder() to construct. + private TextArrayTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as text array and performs following transformation
+       * functions.
+       * *  Concatenate all text values in the array into a single text value
+       * using
+       *    a space (" ") as a delimiter, and then treat the result as a single
+       *    text value. Apply the transformations for Text columns.
+       * *  Empty arrays treated as an empty text.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int transformationDetailCase_ = 0; + private java.lang.Object transformationDetail_; + + public enum TransformationDetailCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUTO(1), + NUMERIC(2), + CATEGORICAL(3), + TIMESTAMP(4), + TEXT(5), + REPEATED_NUMERIC(6), + REPEATED_CATEGORICAL(7), + REPEATED_TEXT(8), + TRANSFORMATIONDETAIL_NOT_SET(0); + private final int value; + + private TransformationDetailCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationDetailCase valueOf(int value) { + return forNumber(value); + } + + public static TransformationDetailCase forNumber(int value) { + switch (value) { + case 1: + return AUTO; + case 2: + return NUMERIC; + case 3: + return CATEGORICAL; + case 4: + return TIMESTAMP; + case 5: + return TEXT; + case 6: + return REPEATED_NUMERIC; + case 7: + return REPEATED_CATEGORICAL; + case 8: + return REPEATED_TEXT; + case 0: + return TRANSFORMATIONDETAIL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransformationDetailCase getTransformationDetailCase() { + return TransformationDetailCase.forNumber(transformationDetailCase_); + } + + public static final int AUTO_FIELD_NUMBER = 1; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + @java.lang.Override + public boolean hasAuto() { + return transformationDetailCase_ == 1; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + getAuto() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + + public static final int NUMERIC_FIELD_NUMBER = 2; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + @java.lang.Override + public boolean hasNumeric() { + return transformationDetailCase_ == 2; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + getNumeric() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + + public static final int CATEGORICAL_FIELD_NUMBER = 3; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + @java.lang.Override + public boolean hasCategorical() { + return transformationDetailCase_ == 3; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + getCategorical() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 4; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return transformationDetailCase_ == 4; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + getTimestamp() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + + public static final int TEXT_FIELD_NUMBER = 5; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return transformationDetailCase_ == 5; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + getText() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + + public static final int REPEATED_NUMERIC_FIELD_NUMBER = 6; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + @java.lang.Override + public boolean hasRepeatedNumeric() { + return transformationDetailCase_ == 6; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } + + public static final int REPEATED_CATEGORICAL_FIELD_NUMBER = 7; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + @java.lang.Override + public boolean hasRepeatedCategorical() { + return transformationDetailCase_ == 7; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + + public static final int REPEATED_TEXT_FIELD_NUMBER = 8; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + @java.lang.Override + public boolean hasRepeatedText() { + return transformationDetailCase_ == 8; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + getRepeatedText() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.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 (transformationDetailCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + output.writeMessage( + 8, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationDetailCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation) + obj; + + if (!getTransformationDetailCase().equals(other.getTransformationDetailCase())) return false; + switch (transformationDetailCase_) { + case 1: + if (!getAuto().equals(other.getAuto())) return false; + break; + case 2: + if (!getNumeric().equals(other.getNumeric())) return false; + break; + case 3: + if (!getCategorical().equals(other.getCategorical())) return false; + break; + case 4: + if (!getTimestamp().equals(other.getTimestamp())) return false; + break; + case 5: + if (!getText().equals(other.getText())) return false; + break; + case 6: + if (!getRepeatedNumeric().equals(other.getRepeatedNumeric())) return false; + break; + case 7: + if (!getRepeatedCategorical().equals(other.getRepeatedCategorical())) return false; + break; + case 8: + if (!getRepeatedText().equals(other.getRepeatedText())) 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 (transformationDetailCase_) { + case 1: + hash = (37 * hash) + AUTO_FIELD_NUMBER; + hash = (53 * hash) + getAuto().hashCode(); + break; + case 2: + hash = (37 * hash) + NUMERIC_FIELD_NUMBER; + hash = (53 * hash) + getNumeric().hashCode(); + break; + case 3: + hash = (37 * hash) + CATEGORICAL_FIELD_NUMBER; + hash = (53 * hash) + getCategorical().hashCode(); + break; + case 4: + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + break; + case 5: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 6: + hash = (37 * hash) + REPEATED_NUMERIC_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedNumeric().hashCode(); + break; + case 7: + hash = (37 * hash) + REPEATED_CATEGORICAL_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedCategorical().hashCode(); + break; + case 8: + hash = (37 * hash) + REPEATED_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .TransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.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(); + transformationDetailCase_ = 0; + transformationDetail_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Transformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation(this); + if (transformationDetailCase_ == 1) { + if (autoBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = autoBuilder_.build(); + } + } + if (transformationDetailCase_ == 2) { + if (numericBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = numericBuilder_.build(); + } + } + if (transformationDetailCase_ == 3) { + if (categoricalBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = categoricalBuilder_.build(); + } + } + if (transformationDetailCase_ == 4) { + if (timestampBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = timestampBuilder_.build(); + } + } + if (transformationDetailCase_ == 5) { + if (textBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = textBuilder_.build(); + } + } + if (transformationDetailCase_ == 6) { + if (repeatedNumericBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedNumericBuilder_.build(); + } + } + if (transformationDetailCase_ == 7) { + if (repeatedCategoricalBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedCategoricalBuilder_.build(); + } + } + if (transformationDetailCase_ == 8) { + if (repeatedTextBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedTextBuilder_.build(); + } + } + result.transformationDetailCase_ = transformationDetailCase_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.getDefaultInstance()) return this; + switch (other.getTransformationDetailCase()) { + case AUTO: + { + mergeAuto(other.getAuto()); + break; + } + case NUMERIC: + { + mergeNumeric(other.getNumeric()); + break; + } + case CATEGORICAL: + { + mergeCategorical(other.getCategorical()); + break; + } + case TIMESTAMP: + { + mergeTimestamp(other.getTimestamp()); + break; + } + case TEXT: + { + mergeText(other.getText()); + break; + } + case REPEATED_NUMERIC: + { + mergeRepeatedNumeric(other.getRepeatedNumeric()); + break; + } + case REPEATED_CATEGORICAL: + { + mergeRepeatedCategorical(other.getRepeatedCategorical()); + break; + } + case REPEATED_TEXT: + { + mergeRepeatedText(other.getRepeatedText()); + break; + } + case TRANSFORMATIONDETAIL_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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int transformationDetailCase_ = 0; + private java.lang.Object transformationDetail_; + + public TransformationDetailCase getTransformationDetailCase() { + return TransformationDetailCase.forNumber(transformationDetailCase_); + } + + public Builder clearTransformationDetail() { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformationOrBuilder> + autoBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + @java.lang.Override + public boolean hasAuto() { + return transformationDetailCase_ == 1; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + getAuto() { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 1) { + return autoBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + value) { + if (autoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + autoBuilder_.setMessage(value); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation.Builder + builderForValue) { + if (autoBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + autoBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder mergeAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.AutoTransformation + value) { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 1) { + autoBuilder_.mergeFrom(value); + } + autoBuilder_.setMessage(value); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder clearAuto() { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 1) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + autoBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder + getAutoBuilder() { + return getAutoFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if ((transformationDetailCase_ == 1) && (autoBuilder_ != null)) { + return autoBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.AutoTransformation auto = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformationOrBuilder> + getAutoFieldBuilder() { + if (autoBuilder_ == null) { + if (!(transformationDetailCase_ == 1)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + autoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.AutoTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 1; + onChanged(); + ; + return autoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformationOrBuilder> + numericBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + @java.lang.Override + public boolean hasNumeric() { + return transformationDetailCase_ == 2; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + getNumeric() { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 2) { + return numericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + value) { + if (numericBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + numericBuilder_.setMessage(value); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation.Builder + builderForValue) { + if (numericBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + numericBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder mergeNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericTransformation + value) { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 2) { + numericBuilder_.mergeFrom(value); + } + numericBuilder_.setMessage(value); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder clearNumeric() { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 2) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + numericBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder + getNumericBuilder() { + return getNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if ((transformationDetailCase_ == 2) && (numericBuilder_ != null)) { + return numericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericTransformation numeric = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformationOrBuilder> + getNumericFieldBuilder() { + if (numericBuilder_ == null) { + if (!(transformationDetailCase_ == 2)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation + .getDefaultInstance(); + } + numericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 2; + onChanged(); + ; + return numericBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformationOrBuilder> + categoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + @java.lang.Override + public boolean hasCategorical() { + return transformationDetailCase_ == 3; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + getCategorical() { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance(); + } else { + if (transformationDetailCase_ == 3) { + return categoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + value) { + if (categoricalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + categoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation.Builder + builderForValue) { + if (categoricalBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + categoricalBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder mergeCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalTransformation + value) { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 3) { + categoricalBuilder_.mergeFrom(value); + } + categoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder clearCategorical() { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 3) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + categoricalBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder + getCategoricalBuilder() { + return getCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if ((transformationDetailCase_ == 3) && (categoricalBuilder_ != null)) { + return categoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformationOrBuilder> + getCategoricalFieldBuilder() { + if (categoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 3)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation + .getDefaultInstance(); + } + categoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 3; + onChanged(); + ; + return categoricalBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformationOrBuilder> + timestampBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return transformationDetailCase_ == 4; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + getTimestamp() { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 4) { + return timestampBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation.Builder + builderForValue) { + if (timestampBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder mergeTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TimestampTransformation + value) { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 4) { + timestampBuilder_.mergeFrom(value); + } + timestampBuilder_.setMessage(value); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 4) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + timestampBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder + getTimestampBuilder() { + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if ((transformationDetailCase_ == 4) && (timestampBuilder_ != null)) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformationOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + if (!(transformationDetailCase_ == 4)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation + .getDefaultInstance(); + } + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TimestampTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 4; + onChanged(); + ; + return timestampBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformationOrBuilder> + textBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return transformationDetailCase_ == 5; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + getText() { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 5) { + return textBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation.Builder + builderForValue) { + if (textBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder mergeText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextTransformation + value) { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 5) { + textBuilder_.mergeFrom(value); + } + textBuilder_.setMessage(value); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder clearText() { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 5) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + textBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder + getTextBuilder() { + return getTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if ((transformationDetailCase_ == 5) && (textBuilder_ != null)) { + return textBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextTransformation text = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformationOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + if (!(transformationDetailCase_ == 5)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.getDefaultInstance(); + } + textBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 5; + onChanged(); + ; + return textBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformationOrBuilder> + repeatedNumericBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + @java.lang.Override + public boolean hasRepeatedNumeric() { + return transformationDetailCase_ == 6; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance(); + } else { + if (transformationDetailCase_ == 6) { + return repeatedNumericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + value) { + if (repeatedNumericBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedNumericBuilder_.setMessage(value); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation.Builder + builderForValue) { + if (repeatedNumericBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedNumericBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder mergeRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.NumericArrayTransformation + value) { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 6) { + repeatedNumericBuilder_.mergeFrom(value); + } + repeatedNumericBuilder_.setMessage(value); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder clearRepeatedNumeric() { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 6) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedNumericBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder + getRepeatedNumericBuilder() { + return getRepeatedNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if ((transformationDetailCase_ == 6) && (repeatedNumericBuilder_ != null)) { + return repeatedNumericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformationOrBuilder> + getRepeatedNumericFieldBuilder() { + if (repeatedNumericBuilder_ == null) { + if (!(transformationDetailCase_ == 6)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation + .getDefaultInstance(); + } + repeatedNumericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.NumericArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 6; + onChanged(); + ; + return repeatedNumericBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformationOrBuilder> + repeatedCategoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + @java.lang.Override + public boolean hasRepeatedCategorical() { + return transformationDetailCase_ == 7; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } else { + if (transformationDetailCase_ == 7) { + return repeatedCategoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + value) { + if (repeatedCategoricalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedCategoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation.Builder + builderForValue) { + if (repeatedCategoricalBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedCategoricalBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder mergeRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.CategoricalArrayTransformation + value) { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + .CategoricalArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 7) { + repeatedCategoricalBuilder_.mergeFrom(value); + } + repeatedCategoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder clearRepeatedCategorical() { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 7) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedCategoricalBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.Builder + getRepeatedCategoricalBuilder() { + return getRepeatedCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if ((transformationDetailCase_ == 7) && (repeatedCategoricalBuilder_ != null)) { + return repeatedCategoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformationOrBuilder> + getRepeatedCategoricalFieldBuilder() { + if (repeatedCategoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 7)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + repeatedCategoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + .CategoricalArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 7; + onChanged(); + ; + return repeatedCategoricalBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformationOrBuilder> + repeatedTextBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + @java.lang.Override + public boolean hasRepeatedText() { + return transformationDetailCase_ == 8; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + getRepeatedText() { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 8) { + return repeatedTextBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + value) { + if (repeatedTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedTextBuilder_.setMessage(value); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation.Builder + builderForValue) { + if (repeatedTextBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedTextBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder mergeRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.TextArrayTransformation + value) { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 8) { + repeatedTextBuilder_.mergeFrom(value); + } + repeatedTextBuilder_.setMessage(value); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder clearRepeatedText() { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 8) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedTextBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder + getRepeatedTextBuilder() { + return getRepeatedTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if ((transformationDetailCase_ == 8) && (repeatedTextBuilder_ != null)) { + return repeatedTextBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformationOrBuilder> + getRepeatedTextFieldBuilder() { + if (repeatedTextBuilder_ == null) { + if (!(transformationDetailCase_ == 8)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation + .getDefaultInstance(); + } + repeatedTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.TextArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 8; + onChanged(); + ; + return repeatedTextBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PeriodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The time granularity unit of this time period.
+     * The supported unit are:
+     *  "hour"
+     *  "day"
+     *  "week"
+     *  "month"
+     *  "year"
+     * 
+ * + * string unit = 1; + * + * @return The unit. + */ + java.lang.String getUnit(); + /** + * + * + *
+     * The time granularity unit of this time period.
+     * The supported unit are:
+     *  "hour"
+     *  "day"
+     *  "week"
+     *  "month"
+     *  "year"
+     * 
+ * + * string unit = 1; + * + * @return The bytes for unit. + */ + com.google.protobuf.ByteString getUnitBytes(); + + /** + * + * + *
+     * The number of units per period, e.g. 3 weeks or 2 months.
+     * 
+ * + * int64 quantity = 2; + * + * @return The quantity. + */ + long getQuantity(); + } + /** + * + * + *
+   * A duration of time expressed in time granularity units.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period} + */ + public static final class Period extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period) + PeriodOrBuilder { + private static final long serialVersionUID = 0L; + // Use Period.newBuilder() to construct. + private Period(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Period() { + unit_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Period(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Period( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + unit_ = s; + break; + } + case 16: + { + quantity_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder.class); + } + + public static final int UNIT_FIELD_NUMBER = 1; + private volatile java.lang.Object unit_; + /** + * + * + *
+     * The time granularity unit of this time period.
+     * The supported unit are:
+     *  "hour"
+     *  "day"
+     *  "week"
+     *  "month"
+     *  "year"
+     * 
+ * + * string unit = 1; + * + * @return The unit. + */ + @java.lang.Override + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + 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(); + unit_ = s; + return s; + } + } + /** + * + * + *
+     * The time granularity unit of this time period.
+     * The supported unit are:
+     *  "hour"
+     *  "day"
+     *  "week"
+     *  "month"
+     *  "year"
+     * 
+ * + * string unit = 1; + * + * @return The bytes for unit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUANTITY_FIELD_NUMBER = 2; + private long quantity_; + /** + * + * + *
+     * The number of units per period, e.g. 3 weeks or 2 months.
+     * 
+ * + * int64 quantity = 2; + * + * @return The quantity. + */ + @java.lang.Override + public long getQuantity() { + return quantity_; + } + + 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 (!getUnitBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, unit_); + } + if (quantity_ != 0L) { + output.writeInt64(2, quantity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUnitBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, unit_); + } + if (quantity_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, quantity_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period) + obj; + + if (!getUnit().equals(other.getUnit())) return false; + if (getQuantity() != other.getQuantity()) 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) + UNIT_FIELD_NUMBER; + hash = (53 * hash) + getUnit().hashCode(); + hash = (37 * hash) + QUANTITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getQuantity()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + 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 duration of time expressed in time granularity units.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .PeriodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period.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(); + unit_ = ""; + + quantity_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_Period_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period(this); + result.unit_ = unit_; + result.quantity_ = quantity_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.getDefaultInstance()) return this; + if (!other.getUnit().isEmpty()) { + unit_ = other.unit_; + onChanged(); + } + if (other.getQuantity() != 0L) { + setQuantity(other.getQuantity()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object unit_ = ""; + /** + * + * + *
+       * The time granularity unit of this time period.
+       * The supported unit are:
+       *  "hour"
+       *  "day"
+       *  "week"
+       *  "month"
+       *  "year"
+       * 
+ * + * string unit = 1; + * + * @return The unit. + */ + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The time granularity unit of this time period.
+       * The supported unit are:
+       *  "hour"
+       *  "day"
+       *  "week"
+       *  "month"
+       *  "year"
+       * 
+ * + * string unit = 1; + * + * @return The bytes for unit. + */ + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The time granularity unit of this time period.
+       * The supported unit are:
+       *  "hour"
+       *  "day"
+       *  "week"
+       *  "month"
+       *  "year"
+       * 
+ * + * string unit = 1; + * + * @param value The unit to set. + * @return This builder for chaining. + */ + public Builder setUnit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + unit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The time granularity unit of this time period.
+       * The supported unit are:
+       *  "hour"
+       *  "day"
+       *  "week"
+       *  "month"
+       *  "year"
+       * 
+ * + * string unit = 1; + * + * @return This builder for chaining. + */ + public Builder clearUnit() { + + unit_ = getDefaultInstance().getUnit(); + onChanged(); + return this; + } + /** + * + * + *
+       * The time granularity unit of this time period.
+       * The supported unit are:
+       *  "hour"
+       *  "day"
+       *  "week"
+       *  "month"
+       *  "year"
+       * 
+ * + * string unit = 1; + * + * @param value The bytes for unit to set. + * @return This builder for chaining. + */ + public Builder setUnitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + unit_ = value; + onChanged(); + return this; + } + + private long quantity_; + /** + * + * + *
+       * The number of units per period, e.g. 3 weeks or 2 months.
+       * 
+ * + * int64 quantity = 2; + * + * @return The quantity. + */ + @java.lang.Override + public long getQuantity() { + return quantity_; + } + /** + * + * + *
+       * The number of units per period, e.g. 3 weeks or 2 months.
+       * 
+ * + * int64 quantity = 2; + * + * @param value The quantity to set. + * @return This builder for chaining. + */ + public Builder setQuantity(long value) { + + quantity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of units per period, e.g. 3 weeks or 2 months.
+       * 
+ * + * int64 quantity = 2; + * + * @return This builder for chaining. + */ + public Builder clearQuantity() { + + quantity_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Period parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Period(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TARGET_COLUMN_FIELD_NUMBER = 1; + private volatile java.lang.Object targetColumn_; + /** + * + * + *
+   * The name of the column that the model is to predict.
+   * 
+ * + * string target_column = 1; + * + * @return The targetColumn. + */ + @java.lang.Override + public java.lang.String getTargetColumn() { + java.lang.Object ref = targetColumn_; + 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(); + targetColumn_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the column that the model is to predict.
+   * 
+ * + * string target_column = 1; + * + * @return The bytes for targetColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetColumnBytes() { + java.lang.Object ref = targetColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_SERIES_IDENTIFIER_COLUMN_FIELD_NUMBER = 2; + private volatile java.lang.Object timeSeriesIdentifierColumn_; + /** + * + * + *
+   * The name of the column that identifies the time series.
+   * 
+ * + * string time_series_identifier_column = 2; + * + * @return The timeSeriesIdentifierColumn. + */ + @java.lang.Override + public java.lang.String getTimeSeriesIdentifierColumn() { + java.lang.Object ref = timeSeriesIdentifierColumn_; + 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(); + timeSeriesIdentifierColumn_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the column that identifies the time series.
+   * 
+ * + * string time_series_identifier_column = 2; + * + * @return The bytes for timeSeriesIdentifierColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeSeriesIdentifierColumnBytes() { + java.lang.Object ref = timeSeriesIdentifierColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSeriesIdentifierColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_COLUMN_FIELD_NUMBER = 3; + private volatile java.lang.Object timeColumn_; + /** + * + * + *
+   * The name of the column that identifies time order in the time series.
+   * 
+ * + * string time_column = 3; + * + * @return The timeColumn. + */ + @java.lang.Override + public java.lang.String getTimeColumn() { + java.lang.Object ref = timeColumn_; + 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(); + timeColumn_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the column that identifies time order in the time series.
+   * 
+ * + * string time_column = 3; + * + * @return The bytes for timeColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeColumnBytes() { + java.lang.Object ref = timeColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFORMATIONS_FIELD_NUMBER = 4; + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation> + transformations_; + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation> + getTransformationsList() { + return transformations_; + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder> + getTransformationsOrBuilderList() { + return transformations_; + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + @java.lang.Override + public int getTransformationsCount() { + return transformations_.size(); + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + getTransformations(int index) { + return transformations_.get(index); + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index) { + return transformations_.get(index); + } + + public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 5; + private volatile java.lang.Object optimizationObjective_; + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that optimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+   *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+   *     percentage error (WAPE) and mean-absolute-error (MAE).
+   * 
+ * + * string optimization_objective = 5; + * + * @return The optimizationObjective. + */ + @java.lang.Override + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + 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(); + optimizationObjective_ = s; + return s; + } + } + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that optimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+   *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+   *     percentage error (WAPE) and mean-absolute-error (MAE).
+   * 
+ * + * string optimization_objective = 5; + * + * @return The bytes for optimizationObjective. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 6; + private long trainBudgetMilliNodeHours_; + /** + * + * + *
+   * Required. The train budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour.
+   * The training cost of the model will not exceed this budget. The final cost
+   * will be attempted to be close to the budget, though may end up being (even)
+   * noticeably smaller - at the backend's discretion. This especially may
+   * happen when further model training ceases to provide any improvements.
+   * If the budget is set to a value known to be insufficient to train a
+   * model for the given dataset, the training won't be attempted and
+   * will error.
+   * The train budget must be between 1,000 and 72,000 milli node hours,
+   * inclusive.
+   * 
+ * + * int64 train_budget_milli_node_hours = 6; + * + * @return The trainBudgetMilliNodeHours. + */ + @java.lang.Override + public long getTrainBudgetMilliNodeHours() { + return trainBudgetMilliNodeHours_; + } + + public static final int WEIGHT_COLUMN_FIELD_NUMBER = 7; + private volatile java.lang.Object weightColumn_; + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column = 7; + * + * @return The weightColumn. + */ + @java.lang.Override + public java.lang.String getWeightColumn() { + java.lang.Object ref = weightColumn_; + 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(); + weightColumn_ = s; + return s; + } + } + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column = 7; + * + * @return The bytes for weightColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWeightColumnBytes() { + java.lang.Object ref = weightColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + weightColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATIC_COLUMNS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList staticColumns_; + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @return A list containing the staticColumns. + */ + public com.google.protobuf.ProtocolStringList getStaticColumnsList() { + return staticColumns_; + } + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @return The count of staticColumns. + */ + public int getStaticColumnsCount() { + return staticColumns_.size(); + } + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the element to return. + * @return The staticColumns at the given index. + */ + public java.lang.String getStaticColumns(int index) { + return staticColumns_.get(index); + } + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the value to return. + * @return The bytes of the staticColumns at the given index. + */ + public com.google.protobuf.ByteString getStaticColumnsBytes(int index) { + return staticColumns_.getByteString(index); + } + + public static final int TIME_VARIANT_PAST_ONLY_COLUMNS_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList timeVariantPastOnlyColumns_; + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return A list containing the timeVariantPastOnlyColumns. + */ + public com.google.protobuf.ProtocolStringList getTimeVariantPastOnlyColumnsList() { + return timeVariantPastOnlyColumns_; + } + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return The count of timeVariantPastOnlyColumns. + */ + public int getTimeVariantPastOnlyColumnsCount() { + return timeVariantPastOnlyColumns_.size(); + } + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the element to return. + * @return The timeVariantPastOnlyColumns at the given index. + */ + public java.lang.String getTimeVariantPastOnlyColumns(int index) { + return timeVariantPastOnlyColumns_.get(index); + } + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastOnlyColumns at the given index. + */ + public com.google.protobuf.ByteString getTimeVariantPastOnlyColumnsBytes(int index) { + return timeVariantPastOnlyColumns_.getByteString(index); + } + + public static final int TIME_VARIANT_PAST_AND_FUTURE_COLUMNS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList timeVariantPastAndFutureColumns_; + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return A list containing the timeVariantPastAndFutureColumns. + */ + public com.google.protobuf.ProtocolStringList getTimeVariantPastAndFutureColumnsList() { + return timeVariantPastAndFutureColumns_; + } + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return The count of timeVariantPastAndFutureColumns. + */ + public int getTimeVariantPastAndFutureColumnsCount() { + return timeVariantPastAndFutureColumns_.size(); + } + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the element to return. + * @return The timeVariantPastAndFutureColumns at the given index. + */ + public java.lang.String getTimeVariantPastAndFutureColumns(int index) { + return timeVariantPastAndFutureColumns_.get(index); + } + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastAndFutureColumns at the given index. + */ + public com.google.protobuf.ByteString getTimeVariantPastAndFutureColumnsBytes(int index) { + return timeVariantPastAndFutureColumns_.getByteString(index); + } + + public static final int PERIOD_FIELD_NUMBER = 11; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + period_; + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return Whether the period field is set. + */ + @java.lang.Override + public boolean hasPeriod() { + return period_ != null; + } + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return The period. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + getPeriod() { + return period_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period.getDefaultInstance() + : period_; + } + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .PeriodOrBuilder + getPeriodOrBuilder() { + return getPeriod(); + } + + public static final int FORECAST_WINDOW_START_FIELD_NUMBER = 12; + private long forecastWindowStart_; + /** + * + * + *
+   * The number of periods offset into the future as the start of the forecast
+   * window (the window of future values to predict, relative to the present.),
+   * where each period is one unit of granularity as defined by the `period`
+   * field above. Default to 0. Inclusive.
+   * 
+ * + * int64 forecast_window_start = 12; + * + * @return The forecastWindowStart. + */ + @java.lang.Override + public long getForecastWindowStart() { + return forecastWindowStart_; + } + + public static final int FORECAST_WINDOW_END_FIELD_NUMBER = 13; + private long forecastWindowEnd_; + /** + * + * + *
+   * The number of periods offset into the future as the end of the forecast
+   * window (the window of future values to predict, relative to the present.),
+   * where each period is one unit of granularity as defined by the `period`
+   * field above. Inclusive.
+   * 
+ * + * int64 forecast_window_end = 13; + * + * @return The forecastWindowEnd. + */ + @java.lang.Override + public long getForecastWindowEnd() { + return forecastWindowEnd_; + } + + public static final int PAST_HORIZON_FIELD_NUMBER = 14; + private long pastHorizon_; + /** + * + * + *
+   * The number of periods offset into the past to restrict past sequence, where
+   * each period is one unit of granularity as defined by the `period`. Default
+   * value 0 means that it lets algorithm to define the value. Inclusive.
+   * 
+ * + * int64 past_horizon = 14; + * + * @return The pastHorizon. + */ + @java.lang.Override + public long getPastHorizon() { + return pastHorizon_; + } + + public static final int EXPORT_EVALUATED_DATA_ITEMS_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + exportEvaluatedDataItemsConfig_; + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + @java.lang.Override + public boolean hasExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfig_ != null; + } + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder() { + return getExportEvaluatedDataItemsConfig(); + } + + 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 (!getTargetColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetColumn_); + } + if (!getTimeSeriesIdentifierColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeSeriesIdentifierColumn_); + } + if (!getTimeColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timeColumn_); + } + for (int i = 0; i < transformations_.size(); i++) { + output.writeMessage(4, transformations_.get(i)); + } + if (!getOptimizationObjectiveBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optimizationObjective_); + } + if (trainBudgetMilliNodeHours_ != 0L) { + output.writeInt64(6, trainBudgetMilliNodeHours_); + } + if (!getWeightColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, weightColumn_); + } + for (int i = 0; i < staticColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, staticColumns_.getRaw(i)); + } + for (int i = 0; i < timeVariantPastOnlyColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 9, timeVariantPastOnlyColumns_.getRaw(i)); + } + for (int i = 0; i < timeVariantPastAndFutureColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 10, timeVariantPastAndFutureColumns_.getRaw(i)); + } + if (period_ != null) { + output.writeMessage(11, getPeriod()); + } + if (forecastWindowStart_ != 0L) { + output.writeInt64(12, forecastWindowStart_); + } + if (forecastWindowEnd_ != 0L) { + output.writeInt64(13, forecastWindowEnd_); + } + if (pastHorizon_ != 0L) { + output.writeInt64(14, pastHorizon_); + } + if (exportEvaluatedDataItemsConfig_ != null) { + output.writeMessage(15, getExportEvaluatedDataItemsConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTargetColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetColumn_); + } + if (!getTimeSeriesIdentifierColumnBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeSeriesIdentifierColumn_); + } + if (!getTimeColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timeColumn_); + } + for (int i = 0; i < transformations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, transformations_.get(i)); + } + if (!getOptimizationObjectiveBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, optimizationObjective_); + } + if (trainBudgetMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, trainBudgetMilliNodeHours_); + } + if (!getWeightColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, weightColumn_); + } + { + int dataSize = 0; + for (int i = 0; i < staticColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(staticColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getStaticColumnsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < timeVariantPastOnlyColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(timeVariantPastOnlyColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getTimeVariantPastOnlyColumnsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < timeVariantPastAndFutureColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(timeVariantPastAndFutureColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getTimeVariantPastAndFutureColumnsList().size(); + } + if (period_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPeriod()); + } + if (forecastWindowStart_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, forecastWindowStart_); + } + if (forecastWindowEnd_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, forecastWindowEnd_); + } + if (pastHorizon_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, pastHorizon_); + } + if (exportEvaluatedDataItemsConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, getExportEvaluatedDataItemsConfig()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs) + obj; + + if (!getTargetColumn().equals(other.getTargetColumn())) return false; + if (!getTimeSeriesIdentifierColumn().equals(other.getTimeSeriesIdentifierColumn())) + return false; + if (!getTimeColumn().equals(other.getTimeColumn())) return false; + if (!getTransformationsList().equals(other.getTransformationsList())) return false; + if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; + if (getTrainBudgetMilliNodeHours() != other.getTrainBudgetMilliNodeHours()) return false; + if (!getWeightColumn().equals(other.getWeightColumn())) return false; + if (!getStaticColumnsList().equals(other.getStaticColumnsList())) return false; + if (!getTimeVariantPastOnlyColumnsList().equals(other.getTimeVariantPastOnlyColumnsList())) + return false; + if (!getTimeVariantPastAndFutureColumnsList() + .equals(other.getTimeVariantPastAndFutureColumnsList())) return false; + if (hasPeriod() != other.hasPeriod()) return false; + if (hasPeriod()) { + if (!getPeriod().equals(other.getPeriod())) return false; + } + if (getForecastWindowStart() != other.getForecastWindowStart()) return false; + if (getForecastWindowEnd() != other.getForecastWindowEnd()) return false; + if (getPastHorizon() != other.getPastHorizon()) return false; + if (hasExportEvaluatedDataItemsConfig() != other.hasExportEvaluatedDataItemsConfig()) + return false; + if (hasExportEvaluatedDataItemsConfig()) { + if (!getExportEvaluatedDataItemsConfig().equals(other.getExportEvaluatedDataItemsConfig())) + 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) + TARGET_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getTargetColumn().hashCode(); + hash = (37 * hash) + TIME_SERIES_IDENTIFIER_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getTimeSeriesIdentifierColumn().hashCode(); + hash = (37 * hash) + TIME_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getTimeColumn().hashCode(); + if (getTransformationsCount() > 0) { + hash = (37 * hash) + TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransformationsList().hashCode(); + } + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjective().hashCode(); + hash = (37 * hash) + TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainBudgetMilliNodeHours()); + hash = (37 * hash) + WEIGHT_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getWeightColumn().hashCode(); + if (getStaticColumnsCount() > 0) { + hash = (37 * hash) + STATIC_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getStaticColumnsList().hashCode(); + } + if (getTimeVariantPastOnlyColumnsCount() > 0) { + hash = (37 * hash) + TIME_VARIANT_PAST_ONLY_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getTimeVariantPastOnlyColumnsList().hashCode(); + } + if (getTimeVariantPastAndFutureColumnsCount() > 0) { + hash = (37 * hash) + TIME_VARIANT_PAST_AND_FUTURE_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getTimeVariantPastAndFutureColumnsList().hashCode(); + } + if (hasPeriod()) { + hash = (37 * hash) + PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getPeriod().hashCode(); + } + hash = (37 * hash) + FORECAST_WINDOW_START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getForecastWindowStart()); + hash = (37 * hash) + FORECAST_WINDOW_END_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getForecastWindowEnd()); + hash = (37 * hash) + PAST_HORIZON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPastHorizon()); + if (hasExportEvaluatedDataItemsConfig()) { + hash = (37 * hash) + EXPORT_EVALUATED_DATA_ITEMS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExportEvaluatedDataItemsConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransformationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + targetColumn_ = ""; + + timeSeriesIdentifierColumn_ = ""; + + timeColumn_ = ""; + + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformationsBuilder_.clear(); + } + optimizationObjective_ = ""; + + trainBudgetMilliNodeHours_ = 0L; + + weightColumn_ = ""; + + staticColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + timeVariantPastOnlyColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + timeVariantPastAndFutureColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (periodBuilder_ == null) { + period_ = null; + } else { + period_ = null; + periodBuilder_ = null; + } + forecastWindowStart_ = 0L; + + forecastWindowEnd_ = 0L; + + pastHorizon_ = 0L; + + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = null; + } else { + exportEvaluatedDataItemsConfig_ = null; + exportEvaluatedDataItemsConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs(this); + int from_bitField0_ = bitField0_; + result.targetColumn_ = targetColumn_; + result.timeSeriesIdentifierColumn_ = timeSeriesIdentifierColumn_; + result.timeColumn_ = timeColumn_; + if (transformationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transformations_ = transformations_; + } else { + result.transformations_ = transformationsBuilder_.build(); + } + result.optimizationObjective_ = optimizationObjective_; + result.trainBudgetMilliNodeHours_ = trainBudgetMilliNodeHours_; + result.weightColumn_ = weightColumn_; + if (((bitField0_ & 0x00000002) != 0)) { + staticColumns_ = staticColumns_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.staticColumns_ = staticColumns_; + if (((bitField0_ & 0x00000004) != 0)) { + timeVariantPastOnlyColumns_ = timeVariantPastOnlyColumns_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.timeVariantPastOnlyColumns_ = timeVariantPastOnlyColumns_; + if (((bitField0_ & 0x00000008) != 0)) { + timeVariantPastAndFutureColumns_ = timeVariantPastAndFutureColumns_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.timeVariantPastAndFutureColumns_ = timeVariantPastAndFutureColumns_; + if (periodBuilder_ == null) { + result.period_ = period_; + } else { + result.period_ = periodBuilder_.build(); + } + result.forecastWindowStart_ = forecastWindowStart_; + result.forecastWindowEnd_ = forecastWindowEnd_; + result.pastHorizon_ = pastHorizon_; + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + result.exportEvaluatedDataItemsConfig_ = exportEvaluatedDataItemsConfig_; + } else { + result.exportEvaluatedDataItemsConfig_ = exportEvaluatedDataItemsConfigBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.getDefaultInstance()) return this; + if (!other.getTargetColumn().isEmpty()) { + targetColumn_ = other.targetColumn_; + onChanged(); + } + if (!other.getTimeSeriesIdentifierColumn().isEmpty()) { + timeSeriesIdentifierColumn_ = other.timeSeriesIdentifierColumn_; + onChanged(); + } + if (!other.getTimeColumn().isEmpty()) { + timeColumn_ = other.timeColumn_; + onChanged(); + } + if (transformationsBuilder_ == null) { + if (!other.transformations_.isEmpty()) { + if (transformations_.isEmpty()) { + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformationsIsMutable(); + transformations_.addAll(other.transformations_); + } + onChanged(); + } + } else { + if (!other.transformations_.isEmpty()) { + if (transformationsBuilder_.isEmpty()) { + transformationsBuilder_.dispose(); + transformationsBuilder_ = null; + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + transformationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransformationsFieldBuilder() + : null; + } else { + transformationsBuilder_.addAllMessages(other.transformations_); + } + } + } + if (!other.getOptimizationObjective().isEmpty()) { + optimizationObjective_ = other.optimizationObjective_; + onChanged(); + } + if (other.getTrainBudgetMilliNodeHours() != 0L) { + setTrainBudgetMilliNodeHours(other.getTrainBudgetMilliNodeHours()); + } + if (!other.getWeightColumn().isEmpty()) { + weightColumn_ = other.weightColumn_; + onChanged(); + } + if (!other.staticColumns_.isEmpty()) { + if (staticColumns_.isEmpty()) { + staticColumns_ = other.staticColumns_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStaticColumnsIsMutable(); + staticColumns_.addAll(other.staticColumns_); + } + onChanged(); + } + if (!other.timeVariantPastOnlyColumns_.isEmpty()) { + if (timeVariantPastOnlyColumns_.isEmpty()) { + timeVariantPastOnlyColumns_ = other.timeVariantPastOnlyColumns_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTimeVariantPastOnlyColumnsIsMutable(); + timeVariantPastOnlyColumns_.addAll(other.timeVariantPastOnlyColumns_); + } + onChanged(); + } + if (!other.timeVariantPastAndFutureColumns_.isEmpty()) { + if (timeVariantPastAndFutureColumns_.isEmpty()) { + timeVariantPastAndFutureColumns_ = other.timeVariantPastAndFutureColumns_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTimeVariantPastAndFutureColumnsIsMutable(); + timeVariantPastAndFutureColumns_.addAll(other.timeVariantPastAndFutureColumns_); + } + onChanged(); + } + if (other.hasPeriod()) { + mergePeriod(other.getPeriod()); + } + if (other.getForecastWindowStart() != 0L) { + setForecastWindowStart(other.getForecastWindowStart()); + } + if (other.getForecastWindowEnd() != 0L) { + setForecastWindowEnd(other.getForecastWindowEnd()); + } + if (other.getPastHorizon() != 0L) { + setPastHorizon(other.getPastHorizon()); + } + if (other.hasExportEvaluatedDataItemsConfig()) { + mergeExportEvaluatedDataItemsConfig(other.getExportEvaluatedDataItemsConfig()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object targetColumn_ = ""; + /** + * + * + *
+     * The name of the column that the model is to predict.
+     * 
+ * + * string target_column = 1; + * + * @return The targetColumn. + */ + public java.lang.String getTargetColumn() { + java.lang.Object ref = targetColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the column that the model is to predict.
+     * 
+ * + * string target_column = 1; + * + * @return The bytes for targetColumn. + */ + public com.google.protobuf.ByteString getTargetColumnBytes() { + java.lang.Object ref = targetColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the column that the model is to predict.
+     * 
+ * + * string target_column = 1; + * + * @param value The targetColumn to set. + * @return This builder for chaining. + */ + public Builder setTargetColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetColumn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that the model is to predict.
+     * 
+ * + * string target_column = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetColumn() { + + targetColumn_ = getDefaultInstance().getTargetColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that the model is to predict.
+     * 
+ * + * string target_column = 1; + * + * @param value The bytes for targetColumn to set. + * @return This builder for chaining. + */ + public Builder setTargetColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetColumn_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeSeriesIdentifierColumn_ = ""; + /** + * + * + *
+     * The name of the column that identifies the time series.
+     * 
+ * + * string time_series_identifier_column = 2; + * + * @return The timeSeriesIdentifierColumn. + */ + public java.lang.String getTimeSeriesIdentifierColumn() { + java.lang.Object ref = timeSeriesIdentifierColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeSeriesIdentifierColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the column that identifies the time series.
+     * 
+ * + * string time_series_identifier_column = 2; + * + * @return The bytes for timeSeriesIdentifierColumn. + */ + public com.google.protobuf.ByteString getTimeSeriesIdentifierColumnBytes() { + java.lang.Object ref = timeSeriesIdentifierColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeSeriesIdentifierColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the column that identifies the time series.
+     * 
+ * + * string time_series_identifier_column = 2; + * + * @param value The timeSeriesIdentifierColumn to set. + * @return This builder for chaining. + */ + public Builder setTimeSeriesIdentifierColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeSeriesIdentifierColumn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that identifies the time series.
+     * 
+ * + * string time_series_identifier_column = 2; + * + * @return This builder for chaining. + */ + public Builder clearTimeSeriesIdentifierColumn() { + + timeSeriesIdentifierColumn_ = getDefaultInstance().getTimeSeriesIdentifierColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that identifies the time series.
+     * 
+ * + * string time_series_identifier_column = 2; + * + * @param value The bytes for timeSeriesIdentifierColumn to set. + * @return This builder for chaining. + */ + public Builder setTimeSeriesIdentifierColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeSeriesIdentifierColumn_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeColumn_ = ""; + /** + * + * + *
+     * The name of the column that identifies time order in the time series.
+     * 
+ * + * string time_column = 3; + * + * @return The timeColumn. + */ + public java.lang.String getTimeColumn() { + java.lang.Object ref = timeColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the column that identifies time order in the time series.
+     * 
+ * + * string time_column = 3; + * + * @return The bytes for timeColumn. + */ + public com.google.protobuf.ByteString getTimeColumnBytes() { + java.lang.Object ref = timeColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the column that identifies time order in the time series.
+     * 
+ * + * string time_column = 3; + * + * @param value The timeColumn to set. + * @return This builder for chaining. + */ + public Builder setTimeColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeColumn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that identifies time order in the time series.
+     * 
+ * + * string time_column = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeColumn() { + + timeColumn_ = getDefaultInstance().getTimeColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the column that identifies time order in the time series.
+     * 
+ * + * string time_column = 3; + * + * @param value The bytes for timeColumn to set. + * @return This builder for chaining. + */ + public Builder setTimeColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeColumn_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation> + transformations_ = java.util.Collections.emptyList(); + + private void ensureTransformationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transformations_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation>(transformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder> + transformationsBuilder_; + + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation> + getTransformationsList() { + if (transformationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transformations_); + } else { + return transformationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public int getTransformationsCount() { + if (transformationsBuilder_ == null) { + return transformations_.size(); + } else { + return transformationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + getTransformations(int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); + } else { + return transformationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.set(index, value); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.set(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(value); + onChanged(); + } else { + transformationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(index, value); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder addAllTransformations( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation> + values) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transformations_); + onChanged(); + } else { + transformationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder clearTransformations() { + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public Builder removeTransformations(int index) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.remove(index); + onChanged(); + } else { + transformationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + getTransformationsBuilder(int index) { + return getTransformationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); + } else { + return transformationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder> + getTransformationsOrBuilderList() { + if (transformationsBuilder_ != null) { + return transformationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transformations_); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + addTransformationsBuilder() { + return getTransformationsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.getDefaultInstance()); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation.Builder + addTransformationsBuilder(int index) { + return getTransformationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.getDefaultInstance()); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder> + getTransformationsBuilderList() { + return getTransformationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder> + getTransformationsFieldBuilder() { + if (transformationsBuilder_ == null) { + transformationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder>( + transformations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transformations_ = null; + } + return transformationsBuilder_; + } + + private java.lang.Object optimizationObjective_ = ""; + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that optimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+     *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+     *     percentage error (WAPE) and mean-absolute-error (MAE).
+     * 
+ * + * string optimization_objective = 5; + * + * @return The optimizationObjective. + */ + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that optimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+     *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+     *     percentage error (WAPE) and mean-absolute-error (MAE).
+     * 
+ * + * string optimization_objective = 5; + * + * @return The bytes for optimizationObjective. + */ + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that optimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+     *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+     *     percentage error (WAPE) and mean-absolute-error (MAE).
+     * 
+ * + * string optimization_objective = 5; + * + * @param value The optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjective(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + optimizationObjective_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that optimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+     *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+     *     percentage error (WAPE) and mean-absolute-error (MAE).
+     * 
+ * + * string optimization_objective = 5; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjective() { + + optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); + onChanged(); + return this; + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that optimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+     *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+     *     percentage error (WAPE) and mean-absolute-error (MAE).
+     * 
+ * + * string optimization_objective = 5; + * + * @param value The bytes for optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + optimizationObjective_ = value; + onChanged(); + return this; + } + + private long trainBudgetMilliNodeHours_; + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 6; + * + * @return The trainBudgetMilliNodeHours. + */ + @java.lang.Override + public long getTrainBudgetMilliNodeHours() { + return trainBudgetMilliNodeHours_; + } + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 6; + * + * @param value The trainBudgetMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setTrainBudgetMilliNodeHours(long value) { + + trainBudgetMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 6; + * + * @return This builder for chaining. + */ + public Builder clearTrainBudgetMilliNodeHours() { + + trainBudgetMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object weightColumn_ = ""; + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column = 7; + * + * @return The weightColumn. + */ + public java.lang.String getWeightColumn() { + java.lang.Object ref = weightColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + weightColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column = 7; + * + * @return The bytes for weightColumn. + */ + public com.google.protobuf.ByteString getWeightColumnBytes() { + java.lang.Object ref = weightColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + weightColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column = 7; + * + * @param value The weightColumn to set. + * @return This builder for chaining. + */ + public Builder setWeightColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + weightColumn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column = 7; + * + * @return This builder for chaining. + */ + public Builder clearWeightColumn() { + + weightColumn_ = getDefaultInstance().getWeightColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column = 7; + * + * @param value The bytes for weightColumn to set. + * @return This builder for chaining. + */ + public Builder setWeightColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + weightColumn_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList staticColumns_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureStaticColumnsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + staticColumns_ = new com.google.protobuf.LazyStringArrayList(staticColumns_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @return A list containing the staticColumns. + */ + public com.google.protobuf.ProtocolStringList getStaticColumnsList() { + return staticColumns_.getUnmodifiableView(); + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @return The count of staticColumns. + */ + public int getStaticColumnsCount() { + return staticColumns_.size(); + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the element to return. + * @return The staticColumns at the given index. + */ + public java.lang.String getStaticColumns(int index) { + return staticColumns_.get(index); + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the value to return. + * @return The bytes of the staticColumns at the given index. + */ + public com.google.protobuf.ByteString getStaticColumnsBytes(int index) { + return staticColumns_.getByteString(index); + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param index The index to set the value at. + * @param value The staticColumns to set. + * @return This builder for chaining. + */ + public Builder setStaticColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStaticColumnsIsMutable(); + staticColumns_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param value The staticColumns to add. + * @return This builder for chaining. + */ + public Builder addStaticColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStaticColumnsIsMutable(); + staticColumns_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param values The staticColumns to add. + * @return This builder for chaining. + */ + public Builder addAllStaticColumns(java.lang.Iterable values) { + ensureStaticColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, staticColumns_); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @return This builder for chaining. + */ + public Builder clearStaticColumns() { + staticColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as static columns.
+     * The value of these columns are static per time series.
+     * 
+ * + * repeated string static_columns = 8; + * + * @param value The bytes of the staticColumns to add. + * @return This builder for chaining. + */ + public Builder addStaticColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureStaticColumnsIsMutable(); + staticColumns_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList timeVariantPastOnlyColumns_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTimeVariantPastOnlyColumnsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + timeVariantPastOnlyColumns_ = + new com.google.protobuf.LazyStringArrayList(timeVariantPastOnlyColumns_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return A list containing the timeVariantPastOnlyColumns. + */ + public com.google.protobuf.ProtocolStringList getTimeVariantPastOnlyColumnsList() { + return timeVariantPastOnlyColumns_.getUnmodifiableView(); + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return The count of timeVariantPastOnlyColumns. + */ + public int getTimeVariantPastOnlyColumnsCount() { + return timeVariantPastOnlyColumns_.size(); + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the element to return. + * @return The timeVariantPastOnlyColumns at the given index. + */ + public java.lang.String getTimeVariantPastOnlyColumns(int index) { + return timeVariantPastOnlyColumns_.get(index); + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastOnlyColumns at the given index. + */ + public com.google.protobuf.ByteString getTimeVariantPastOnlyColumnsBytes(int index) { + return timeVariantPastOnlyColumns_.getByteString(index); + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index to set the value at. + * @param value The timeVariantPastOnlyColumns to set. + * @return This builder for chaining. + */ + public Builder setTimeVariantPastOnlyColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeVariantPastOnlyColumnsIsMutable(); + timeVariantPastOnlyColumns_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param value The timeVariantPastOnlyColumns to add. + * @return This builder for chaining. + */ + public Builder addTimeVariantPastOnlyColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeVariantPastOnlyColumnsIsMutable(); + timeVariantPastOnlyColumns_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param values The timeVariantPastOnlyColumns to add. + * @return This builder for chaining. + */ + public Builder addAllTimeVariantPastOnlyColumns(java.lang.Iterable values) { + ensureTimeVariantPastOnlyColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeVariantPastOnlyColumns_); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return This builder for chaining. + */ + public Builder clearTimeVariantPastOnlyColumns() { + timeVariantPastOnlyColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past only columns.
+     * This column contains information for the given entity (identified by the
+     * time_series_identifier_column) that is known for the past but not the
+     * future (e.g. population of a city in a given year, or weather on a given
+     * day).
+     * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param value The bytes of the timeVariantPastOnlyColumns to add. + * @return This builder for chaining. + */ + public Builder addTimeVariantPastOnlyColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTimeVariantPastOnlyColumnsIsMutable(); + timeVariantPastOnlyColumns_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList timeVariantPastAndFutureColumns_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTimeVariantPastAndFutureColumnsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + timeVariantPastAndFutureColumns_ = + new com.google.protobuf.LazyStringArrayList(timeVariantPastAndFutureColumns_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return A list containing the timeVariantPastAndFutureColumns. + */ + public com.google.protobuf.ProtocolStringList getTimeVariantPastAndFutureColumnsList() { + return timeVariantPastAndFutureColumns_.getUnmodifiableView(); + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return The count of timeVariantPastAndFutureColumns. + */ + public int getTimeVariantPastAndFutureColumnsCount() { + return timeVariantPastAndFutureColumns_.size(); + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the element to return. + * @return The timeVariantPastAndFutureColumns at the given index. + */ + public java.lang.String getTimeVariantPastAndFutureColumns(int index) { + return timeVariantPastAndFutureColumns_.get(index); + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastAndFutureColumns at the given index. + */ + public com.google.protobuf.ByteString getTimeVariantPastAndFutureColumnsBytes(int index) { + return timeVariantPastAndFutureColumns_.getByteString(index); + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index to set the value at. + * @param value The timeVariantPastAndFutureColumns to set. + * @return This builder for chaining. + */ + public Builder setTimeVariantPastAndFutureColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeVariantPastAndFutureColumnsIsMutable(); + timeVariantPastAndFutureColumns_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param value The timeVariantPastAndFutureColumns to add. + * @return This builder for chaining. + */ + public Builder addTimeVariantPastAndFutureColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeVariantPastAndFutureColumnsIsMutable(); + timeVariantPastAndFutureColumns_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param values The timeVariantPastAndFutureColumns to add. + * @return This builder for chaining. + */ + public Builder addAllTimeVariantPastAndFutureColumns( + java.lang.Iterable values) { + ensureTimeVariantPastAndFutureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, timeVariantPastAndFutureColumns_); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return This builder for chaining. + */ + public Builder clearTimeVariantPastAndFutureColumns() { + timeVariantPastAndFutureColumns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Column names that should be used as time variant past and future columns.
+     * This column contains information for the given entity (identified by the
+     * key column) that is known for the past and the future
+     * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param value The bytes of the timeVariantPastAndFutureColumns to add. + * @return This builder for chaining. + */ + public Builder addTimeVariantPastAndFutureColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTimeVariantPastAndFutureColumnsIsMutable(); + timeVariantPastAndFutureColumns_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period + period_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.PeriodOrBuilder> + periodBuilder_; + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return Whether the period field is set. + */ + public boolean hasPeriod() { + return periodBuilder_ != null || period_ != null; + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return The period. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + getPeriod() { + if (periodBuilder_ == null) { + return period_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.getDefaultInstance() + : period_; + } else { + return periodBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public Builder setPeriod( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + value) { + if (periodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + period_ = value; + onChanged(); + } else { + periodBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public Builder setPeriod( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period.Builder + builderForValue) { + if (periodBuilder_ == null) { + period_ = builderForValue.build(); + onChanged(); + } else { + periodBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public Builder mergePeriod( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period + value) { + if (periodBuilder_ == null) { + if (period_ != null) { + period_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.newBuilder(period_) + .mergeFrom(value) + .buildPartial(); + } else { + period_ = value; + } + onChanged(); + } else { + periodBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public Builder clearPeriod() { + if (periodBuilder_ == null) { + period_ = null; + onChanged(); + } else { + period_ = null; + periodBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Period.Builder + getPeriodBuilder() { + + onChanged(); + return getPeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .PeriodOrBuilder + getPeriodOrBuilder() { + if (periodBuilder_ != null) { + return periodBuilder_.getMessageOrBuilder(); + } else { + return period_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.getDefaultInstance() + : period_; + } + } + /** + * + * + *
+     * Expected difference in time granularity between rows in the data. If it is
+     * not set, the period is inferred from data.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.PeriodOrBuilder> + getPeriodFieldBuilder() { + if (periodBuilder_ == null) { + periodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.Period.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.PeriodOrBuilder>( + getPeriod(), getParentForChildren(), isClean()); + period_ = null; + } + return periodBuilder_; + } + + private long forecastWindowStart_; + /** + * + * + *
+     * The number of periods offset into the future as the start of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Default to 0. Inclusive.
+     * 
+ * + * int64 forecast_window_start = 12; + * + * @return The forecastWindowStart. + */ + @java.lang.Override + public long getForecastWindowStart() { + return forecastWindowStart_; + } + /** + * + * + *
+     * The number of periods offset into the future as the start of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Default to 0. Inclusive.
+     * 
+ * + * int64 forecast_window_start = 12; + * + * @param value The forecastWindowStart to set. + * @return This builder for chaining. + */ + public Builder setForecastWindowStart(long value) { + + forecastWindowStart_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of periods offset into the future as the start of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Default to 0. Inclusive.
+     * 
+ * + * int64 forecast_window_start = 12; + * + * @return This builder for chaining. + */ + public Builder clearForecastWindowStart() { + + forecastWindowStart_ = 0L; + onChanged(); + return this; + } + + private long forecastWindowEnd_; + /** + * + * + *
+     * The number of periods offset into the future as the end of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Inclusive.
+     * 
+ * + * int64 forecast_window_end = 13; + * + * @return The forecastWindowEnd. + */ + @java.lang.Override + public long getForecastWindowEnd() { + return forecastWindowEnd_; + } + /** + * + * + *
+     * The number of periods offset into the future as the end of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Inclusive.
+     * 
+ * + * int64 forecast_window_end = 13; + * + * @param value The forecastWindowEnd to set. + * @return This builder for chaining. + */ + public Builder setForecastWindowEnd(long value) { + + forecastWindowEnd_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of periods offset into the future as the end of the forecast
+     * window (the window of future values to predict, relative to the present.),
+     * where each period is one unit of granularity as defined by the `period`
+     * field above. Inclusive.
+     * 
+ * + * int64 forecast_window_end = 13; + * + * @return This builder for chaining. + */ + public Builder clearForecastWindowEnd() { + + forecastWindowEnd_ = 0L; + onChanged(); + return this; + } + + private long pastHorizon_; + /** + * + * + *
+     * The number of periods offset into the past to restrict past sequence, where
+     * each period is one unit of granularity as defined by the `period`. Default
+     * value 0 means that it lets algorithm to define the value. Inclusive.
+     * 
+ * + * int64 past_horizon = 14; + * + * @return The pastHorizon. + */ + @java.lang.Override + public long getPastHorizon() { + return pastHorizon_; + } + /** + * + * + *
+     * The number of periods offset into the past to restrict past sequence, where
+     * each period is one unit of granularity as defined by the `period`. Default
+     * value 0 means that it lets algorithm to define the value. Inclusive.
+     * 
+ * + * int64 past_horizon = 14; + * + * @param value The pastHorizon to set. + * @return This builder for chaining. + */ + public Builder setPastHorizon(long value) { + + pastHorizon_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of periods offset into the past to restrict past sequence, where
+     * each period is one unit of granularity as defined by the `period`. Default
+     * value 0 means that it lets algorithm to define the value. Inclusive.
+     * 
+ * + * int64 past_horizon = 14; + * + * @return This builder for chaining. + */ + public Builder clearPastHorizon() { + + pastHorizon_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + exportEvaluatedDataItemsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder> + exportEvaluatedDataItemsConfigBuilder_; + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + public boolean hasExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfigBuilder_ != null + || exportEvaluatedDataItemsConfig_ != null; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } else { + return exportEvaluatedDataItemsConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + value) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exportEvaluatedDataItemsConfig_ = value; + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + builderForValue) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = builderForValue.build(); + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public Builder mergeExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + value) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + if (exportEvaluatedDataItemsConfig_ != null) { + exportEvaluatedDataItemsConfig_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.newBuilder(exportEvaluatedDataItemsConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + exportEvaluatedDataItemsConfig_ = value; + } + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public Builder clearExportEvaluatedDataItemsConfig() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = null; + onChanged(); + } else { + exportEvaluatedDataItemsConfig_ = null; + exportEvaluatedDataItemsConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + getExportEvaluatedDataItemsConfigBuilder() { + + onChanged(); + return getExportEvaluatedDataItemsConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ != null) { + return exportEvaluatedDataItemsConfigBuilder_.getMessageOrBuilder(); + } else { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder> + getExportEvaluatedDataItemsConfigFieldBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder>( + getExportEvaluatedDataItemsConfig(), getParentForChildren(), isClean()); + exportEvaluatedDataItemsConfig_ = null; + } + return exportEvaluatedDataItemsConfigBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlForecastingInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlForecastingInputs(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputsOrBuilder.java new file mode 100644 index 000000000..38b60f5e6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputsOrBuilder.java @@ -0,0 +1,610 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlForecastingInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the column that the model is to predict.
+   * 
+ * + * string target_column = 1; + * + * @return The targetColumn. + */ + java.lang.String getTargetColumn(); + /** + * + * + *
+   * The name of the column that the model is to predict.
+   * 
+ * + * string target_column = 1; + * + * @return The bytes for targetColumn. + */ + com.google.protobuf.ByteString getTargetColumnBytes(); + + /** + * + * + *
+   * The name of the column that identifies the time series.
+   * 
+ * + * string time_series_identifier_column = 2; + * + * @return The timeSeriesIdentifierColumn. + */ + java.lang.String getTimeSeriesIdentifierColumn(); + /** + * + * + *
+   * The name of the column that identifies the time series.
+   * 
+ * + * string time_series_identifier_column = 2; + * + * @return The bytes for timeSeriesIdentifierColumn. + */ + com.google.protobuf.ByteString getTimeSeriesIdentifierColumnBytes(); + + /** + * + * + *
+   * The name of the column that identifies time order in the time series.
+   * 
+ * + * string time_column = 3; + * + * @return The timeColumn. + */ + java.lang.String getTimeColumn(); + /** + * + * + *
+   * The name of the column that identifies time order in the time series.
+   * 
+ * + * string time_column = 3; + * + * @return The bytes for timeColumn. + */ + com.google.protobuf.ByteString getTimeColumnBytes(); + + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation> + getTransformationsList(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .Transformation + getTransformations(int index); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + int getTransformationsCount(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingInputs.TransformationOrBuilder> + getTransformationsOrBuilderList(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Transformation transformations = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index); + + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that optimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+   *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+   *     percentage error (WAPE) and mean-absolute-error (MAE).
+   * 
+ * + * string optimization_objective = 5; + * + * @return The optimizationObjective. + */ + java.lang.String getOptimizationObjective(); + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that optimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   *   "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE).
+   *   "minimize-wape-mae" - Minimize the combination of weighted absolute
+   *     percentage error (WAPE) and mean-absolute-error (MAE).
+   * 
+ * + * string optimization_objective = 5; + * + * @return The bytes for optimizationObjective. + */ + com.google.protobuf.ByteString getOptimizationObjectiveBytes(); + + /** + * + * + *
+   * Required. The train budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour.
+   * The training cost of the model will not exceed this budget. The final cost
+   * will be attempted to be close to the budget, though may end up being (even)
+   * noticeably smaller - at the backend's discretion. This especially may
+   * happen when further model training ceases to provide any improvements.
+   * If the budget is set to a value known to be insufficient to train a
+   * model for the given dataset, the training won't be attempted and
+   * will error.
+   * The train budget must be between 1,000 and 72,000 milli node hours,
+   * inclusive.
+   * 
+ * + * int64 train_budget_milli_node_hours = 6; + * + * @return The trainBudgetMilliNodeHours. + */ + long getTrainBudgetMilliNodeHours(); + + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column = 7; + * + * @return The weightColumn. + */ + java.lang.String getWeightColumn(); + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column = 7; + * + * @return The bytes for weightColumn. + */ + com.google.protobuf.ByteString getWeightColumnBytes(); + + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @return A list containing the staticColumns. + */ + java.util.List getStaticColumnsList(); + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @return The count of staticColumns. + */ + int getStaticColumnsCount(); + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the element to return. + * @return The staticColumns at the given index. + */ + java.lang.String getStaticColumns(int index); + /** + * + * + *
+   * Column names that should be used as static columns.
+   * The value of these columns are static per time series.
+   * 
+ * + * repeated string static_columns = 8; + * + * @param index The index of the value to return. + * @return The bytes of the staticColumns at the given index. + */ + com.google.protobuf.ByteString getStaticColumnsBytes(int index); + + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return A list containing the timeVariantPastOnlyColumns. + */ + java.util.List getTimeVariantPastOnlyColumnsList(); + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @return The count of timeVariantPastOnlyColumns. + */ + int getTimeVariantPastOnlyColumnsCount(); + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the element to return. + * @return The timeVariantPastOnlyColumns at the given index. + */ + java.lang.String getTimeVariantPastOnlyColumns(int index); + /** + * + * + *
+   * Column names that should be used as time variant past only columns.
+   * This column contains information for the given entity (identified by the
+   * time_series_identifier_column) that is known for the past but not the
+   * future (e.g. population of a city in a given year, or weather on a given
+   * day).
+   * 
+ * + * repeated string time_variant_past_only_columns = 9; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastOnlyColumns at the given index. + */ + com.google.protobuf.ByteString getTimeVariantPastOnlyColumnsBytes(int index); + + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return A list containing the timeVariantPastAndFutureColumns. + */ + java.util.List getTimeVariantPastAndFutureColumnsList(); + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @return The count of timeVariantPastAndFutureColumns. + */ + int getTimeVariantPastAndFutureColumnsCount(); + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the element to return. + * @return The timeVariantPastAndFutureColumns at the given index. + */ + java.lang.String getTimeVariantPastAndFutureColumns(int index); + /** + * + * + *
+   * Column names that should be used as time variant past and future columns.
+   * This column contains information for the given entity (identified by the
+   * key column) that is known for the past and the future
+   * 
+ * + * repeated string time_variant_past_and_future_columns = 10; + * + * @param index The index of the value to return. + * @return The bytes of the timeVariantPastAndFutureColumns at the given index. + */ + com.google.protobuf.ByteString getTimeVariantPastAndFutureColumnsBytes(int index); + + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return Whether the period field is set. + */ + boolean hasPeriod(); + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + * + * @return The period. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period + getPeriod(); + /** + * + * + *
+   * Expected difference in time granularity between rows in the data. If it is
+   * not set, the period is inferred from data.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs.Period period = 11; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + .PeriodOrBuilder + getPeriodOrBuilder(); + + /** + * + * + *
+   * The number of periods offset into the future as the start of the forecast
+   * window (the window of future values to predict, relative to the present.),
+   * where each period is one unit of granularity as defined by the `period`
+   * field above. Default to 0. Inclusive.
+   * 
+ * + * int64 forecast_window_start = 12; + * + * @return The forecastWindowStart. + */ + long getForecastWindowStart(); + + /** + * + * + *
+   * The number of periods offset into the future as the end of the forecast
+   * window (the window of future values to predict, relative to the present.),
+   * where each period is one unit of granularity as defined by the `period`
+   * field above. Inclusive.
+   * 
+ * + * int64 forecast_window_end = 13; + * + * @return The forecastWindowEnd. + */ + long getForecastWindowEnd(); + + /** + * + * + *
+   * The number of periods offset into the past to restrict past sequence, where
+   * each period is one unit of granularity as defined by the `period`. Default
+   * value 0 means that it lets algorithm to define the value. Inclusive.
+   * 
+ * + * int64 past_horizon = 14; + * + * @return The pastHorizon. + */ + long getPastHorizon(); + + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + boolean hasExportEvaluatedDataItemsConfig(); + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig(); + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadata.java new file mode 100644 index 000000000..fda30ff72 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadata.java @@ -0,0 +1,620 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * Model metadata specific to AutoML Forecasting.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata} + */ +public final class AutoMlForecastingMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata) + AutoMlForecastingMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlForecastingMetadata.newBuilder() to construct. + private AutoMlForecastingMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlForecastingMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlForecastingMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlForecastingMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + trainCostMilliNodeHours_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder.class); + } + + public static final int TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER = 1; + private long trainCostMilliNodeHours_; + /** + * + * + *
+   * Output only. The actual training cost of the model, expressed in milli
+   * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+   * to not exceed the train budget.
+   * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + @java.lang.Override + public long getTrainCostMilliNodeHours() { + return trainCostMilliNodeHours_; + } + + 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 (trainCostMilliNodeHours_ != 0L) { + output.writeInt64(1, trainCostMilliNodeHours_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainCostMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, trainCostMilliNodeHours_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata) + obj; + + if (getTrainCostMilliNodeHours() != other.getTrainCostMilliNodeHours()) 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) + TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainCostMilliNodeHours()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + 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 specific to AutoML Forecasting.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata.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(); + trainCostMilliNodeHours_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLForecastingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlForecastingMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata(this); + result.trainCostMilliNodeHours_ = trainCostMilliNodeHours_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata.getDefaultInstance()) return this; + if (other.getTrainCostMilliNodeHours() != 0L) { + setTrainCostMilliNodeHours(other.getTrainCostMilliNodeHours()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long trainCostMilliNodeHours_; + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + @java.lang.Override + public long getTrainCostMilliNodeHours() { + return trainCostMilliNodeHours_; + } + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @param value The trainCostMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setTrainCostMilliNodeHours(long value) { + + trainCostMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrainCostMilliNodeHours() { + + trainCostMilliNodeHours_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlForecastingMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlForecastingMetadata(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadataOrBuilder.java new file mode 100644 index 000000000..15d24b694 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadataOrBuilder.java @@ -0,0 +1,40 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlForecastingMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The actual training cost of the model, expressed in milli
+   * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+   * to not exceed the train budget.
+   * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + long getTrainCostMilliNodeHours(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingOrBuilder.java new file mode 100644 index 000000000..6435aa1a8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlForecastingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecasting) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlForecastingMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlForecastingMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassification.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassification.java new file mode 100644 index 000000000..0352d9b48 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassification.java @@ -0,0 +1,1207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Image Classification Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification} + */ +public final class AutoMlImageClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification) + AutoMlImageClassificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageClassification.newBuilder() to construct. + private AutoMlImageClassification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageClassification() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageClassification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageClassification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + 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 TrainingJob that trains and uploads an AutoML Image Classification Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassification + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageClassification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageClassification(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java new file mode 100644 index 000000000..6545d4719 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java @@ -0,0 +1,1449 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs} + */ +public final class AutoMlImageClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + AutoMlImageClassificationInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageClassificationInputs.newBuilder() to construct. + private AutoMlImageClassificationInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageClassificationInputs() { + modelType_ = 0; + baseModelId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageClassificationInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageClassificationInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseModelId_ = s; + break; + } + case 24: + { + budgetMilliNodeHours_ = input.readInt64(); + break; + } + case 32: + { + disableEarlyStopping_ = input.readBool(); + break; + } + case 40: + { + multiLabel_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A Model best tailored to be used within Google Cloud, and which cannot
+     * be exported.
+     * Default.
+     * 
+ * + * CLOUD = 1; + */ + CLOUD(1), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device afterwards.
+     * Expected to have low latency, but may have lower prediction
+     * quality than other mobile models.
+     * 
+ * + * MOBILE_TF_LOW_LATENCY_1 = 2; + */ + MOBILE_TF_LOW_LATENCY_1(2), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device with afterwards.
+     * 
+ * + * MOBILE_TF_VERSATILE_1 = 3; + */ + MOBILE_TF_VERSATILE_1(3), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device afterwards.
+     * Expected to have a higher latency, but should also have a higher
+     * prediction quality than other mobile models.
+     * 
+ * + * MOBILE_TF_HIGH_ACCURACY_1 = 4; + */ + MOBILE_TF_HIGH_ACCURACY_1(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A Model best tailored to be used within Google Cloud, and which cannot
+     * be exported.
+     * Default.
+     * 
+ * + * CLOUD = 1; + */ + public static final int CLOUD_VALUE = 1; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device afterwards.
+     * Expected to have low latency, but may have lower prediction
+     * quality than other mobile models.
+     * 
+ * + * MOBILE_TF_LOW_LATENCY_1 = 2; + */ + public static final int MOBILE_TF_LOW_LATENCY_1_VALUE = 2; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device with afterwards.
+     * 
+ * + * MOBILE_TF_VERSATILE_1 = 3; + */ + public static final int MOBILE_TF_VERSATILE_1_VALUE = 3; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * or Core ML model and used on a mobile or edge device afterwards.
+     * Expected to have a higher latency, but should also have a higher
+     * prediction quality than other mobile models.
+     * 
+ * + * MOBILE_TF_HIGH_ACCURACY_1 = 4; + */ + public static final int MOBILE_TF_HIGH_ACCURACY_1_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD; + case 2: + return MOBILE_TF_LOW_LATENCY_1; + case 3: + return MOBILE_TF_VERSATILE_1; + case 4: + return MOBILE_TF_HIGH_ACCURACY_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + + public static final int BASE_MODEL_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object baseModelId_; + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 2; + * + * @return The baseModelId. + */ + @java.lang.Override + public java.lang.String getBaseModelId() { + java.lang.Object ref = baseModelId_; + 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(); + baseModelId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 2; + * + * @return The bytes for baseModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseModelIdBytes() { + java.lang.Object ref = baseModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 3; + private long budgetMilliNodeHours_; + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved.
+   * For modelType `cloud`(default), the budget must be between 8,000
+   * and 800,000 milli node hours, inclusive. The default value is 192,000
+   * which represents one day in wall time, considering 8 nodes are used.
+   * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+   * `mobile-tf-high-accuracy-1`, the training budget must be between
+   * 1,000 and 100,000 milli node hours, inclusive.
+   * The default value is 24,000 which represents one day in wall time on a
+   * single node that is used.
+   * 
+ * + * int64 budget_milli_node_hours = 3; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + + public static final int DISABLE_EARLY_STOPPING_FIELD_NUMBER = 4; + private boolean disableEarlyStopping_; + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * When false the early stopping feature is enabled, which means that
+   * AutoML Image Classification might stop training before the entire
+   * training budget has been used.
+   * 
+ * + * bool disable_early_stopping = 4; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + + public static final int MULTI_LABEL_FIELD_NUMBER = 5; + private boolean multiLabel_; + /** + * + * + *
+   * If false, a single-label (multi-class) Model will be trained (i.e.
+   * assuming that for each image just up to one annotation may be
+   * applicable). If true, a multi-label Model will be trained (i.e.
+   * assuming that for each image multiple annotations may be applicable).
+   * 
+ * + * bool multi_label = 5; + * + * @return The multiLabel. + */ + @java.lang.Override + public boolean getMultiLabel() { + return multiLabel_; + } + + 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + if (!getBaseModelIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, baseModelId_); + } + if (budgetMilliNodeHours_ != 0L) { + output.writeInt64(3, budgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + output.writeBool(4, disableEarlyStopping_); + } + if (multiLabel_ != false) { + output.writeBool(5, multiLabel_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + if (!getBaseModelIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, baseModelId_); + } + if (budgetMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, budgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableEarlyStopping_); + } + if (multiLabel_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, multiLabel_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) + obj; + + if (modelType_ != other.modelType_) return false; + if (!getBaseModelId().equals(other.getBaseModelId())) return false; + if (getBudgetMilliNodeHours() != other.getBudgetMilliNodeHours()) return false; + if (getDisableEarlyStopping() != other.getDisableEarlyStopping()) return false; + if (getMultiLabel() != other.getMultiLabel()) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (37 * hash) + BASE_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getBaseModelId().hashCode(); + hash = (37 * hash) + BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBudgetMilliNodeHours()); + hash = (37 * hash) + DISABLE_EARLY_STOPPING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableEarlyStopping()); + hash = (37 * hash) + MULTI_LABEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMultiLabel()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.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(); + modelType_ = 0; + + baseModelId_ = ""; + + budgetMilliNodeHours_ = 0L; + + disableEarlyStopping_ = false; + + multiLabel_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs(this); + result.modelType_ = modelType_; + result.baseModelId_ = baseModelId_; + result.budgetMilliNodeHours_ = budgetMilliNodeHours_; + result.disableEarlyStopping_ = disableEarlyStopping_; + result.multiLabel_ = multiLabel_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + if (!other.getBaseModelId().isEmpty()) { + baseModelId_ = other.baseModelId_; + onChanged(); + } + if (other.getBudgetMilliNodeHours() != 0L) { + setBudgetMilliNodeHours(other.getBudgetMilliNodeHours()); + } + if (other.getDisableEarlyStopping() != false) { + setDisableEarlyStopping(other.getDisableEarlyStopping()); + } + if (other.getMultiLabel() != false) { + setMultiLabel(other.getMultiLabel()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object baseModelId_ = ""; + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 2; + * + * @return The baseModelId. + */ + public java.lang.String getBaseModelId() { + java.lang.Object ref = baseModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 2; + * + * @return The bytes for baseModelId. + */ + public com.google.protobuf.ByteString getBaseModelIdBytes() { + java.lang.Object ref = baseModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 2; + * + * @param value The baseModelId to set. + * @return This builder for chaining. + */ + public Builder setBaseModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseModelId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearBaseModelId() { + + baseModelId_ = getDefaultInstance().getBaseModelId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 2; + * + * @param value The bytes for baseModelId to set. + * @return This builder for chaining. + */ + public Builder setBaseModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseModelId_ = value; + onChanged(); + return this; + } + + private long budgetMilliNodeHours_; + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 8,000
+     * and 800,000 milli node hours, inclusive. The default value is 192,000
+     * which represents one day in wall time, considering 8 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`, the training budget must be between
+     * 1,000 and 100,000 milli node hours, inclusive.
+     * The default value is 24,000 which represents one day in wall time on a
+     * single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 3; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 8,000
+     * and 800,000 milli node hours, inclusive. The default value is 192,000
+     * which represents one day in wall time, considering 8 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`, the training budget must be between
+     * 1,000 and 100,000 milli node hours, inclusive.
+     * The default value is 24,000 which represents one day in wall time on a
+     * single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 3; + * + * @param value The budgetMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setBudgetMilliNodeHours(long value) { + + budgetMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 8,000
+     * and 800,000 milli node hours, inclusive. The default value is 192,000
+     * which represents one day in wall time, considering 8 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`, the training budget must be between
+     * 1,000 and 100,000 milli node hours, inclusive.
+     * The default value is 24,000 which represents one day in wall time on a
+     * single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 3; + * + * @return This builder for chaining. + */ + public Builder clearBudgetMilliNodeHours() { + + budgetMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private boolean disableEarlyStopping_; + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that
+     * AutoML Image Classification might stop training before the entire
+     * training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 4; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that
+     * AutoML Image Classification might stop training before the entire
+     * training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 4; + * + * @param value The disableEarlyStopping to set. + * @return This builder for chaining. + */ + public Builder setDisableEarlyStopping(boolean value) { + + disableEarlyStopping_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that
+     * AutoML Image Classification might stop training before the entire
+     * training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisableEarlyStopping() { + + disableEarlyStopping_ = false; + onChanged(); + return this; + } + + private boolean multiLabel_; + /** + * + * + *
+     * If false, a single-label (multi-class) Model will be trained (i.e.
+     * assuming that for each image just up to one annotation may be
+     * applicable). If true, a multi-label Model will be trained (i.e.
+     * assuming that for each image multiple annotations may be applicable).
+     * 
+ * + * bool multi_label = 5; + * + * @return The multiLabel. + */ + @java.lang.Override + public boolean getMultiLabel() { + return multiLabel_; + } + /** + * + * + *
+     * If false, a single-label (multi-class) Model will be trained (i.e.
+     * assuming that for each image just up to one annotation may be
+     * applicable). If true, a multi-label Model will be trained (i.e.
+     * assuming that for each image multiple annotations may be applicable).
+     * 
+ * + * bool multi_label = 5; + * + * @param value The multiLabel to set. + * @return This builder for chaining. + */ + public Builder setMultiLabel(boolean value) { + + multiLabel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If false, a single-label (multi-class) Model will be trained (i.e.
+     * assuming that for each image just up to one annotation may be
+     * applicable). If true, a multi-label Model will be trained (i.e.
+     * assuming that for each image multiple annotations may be applicable).
+     * 
+ * + * bool multi_label = 5; + * + * @return This builder for chaining. + */ + public Builder clearMultiLabel() { + + multiLabel_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageClassificationInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageClassificationInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java new file mode 100644 index 000000000..2f2770e51 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs + .ModelType + getModelType(); + + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 2; + * + * @return The baseModelId. + */ + java.lang.String getBaseModelId(); + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 2; + * + * @return The bytes for baseModelId. + */ + com.google.protobuf.ByteString getBaseModelIdBytes(); + + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved.
+   * For modelType `cloud`(default), the budget must be between 8,000
+   * and 800,000 milli node hours, inclusive. The default value is 192,000
+   * which represents one day in wall time, considering 8 nodes are used.
+   * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+   * `mobile-tf-high-accuracy-1`, the training budget must be between
+   * 1,000 and 100,000 milli node hours, inclusive.
+   * The default value is 24,000 which represents one day in wall time on a
+   * single node that is used.
+   * 
+ * + * int64 budget_milli_node_hours = 3; + * + * @return The budgetMilliNodeHours. + */ + long getBudgetMilliNodeHours(); + + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * When false the early stopping feature is enabled, which means that
+   * AutoML Image Classification might stop training before the entire
+   * training budget has been used.
+   * 
+ * + * bool disable_early_stopping = 4; + * + * @return The disableEarlyStopping. + */ + boolean getDisableEarlyStopping(); + + /** + * + * + *
+   * If false, a single-label (multi-class) Model will be trained (i.e.
+   * assuming that for each image just up to one annotation may be
+   * applicable). If true, a multi-label Model will be trained (i.e.
+   * assuming that for each image multiple annotations may be applicable).
+   * 
+ * + * bool multi_label = 5; + * + * @return The multiLabel. + */ + boolean getMultiLabel(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java new file mode 100644 index 000000000..9cc70e6f0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java @@ -0,0 +1,980 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata} + */ +public final class AutoMlImageClassificationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + AutoMlImageClassificationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageClassificationMetadata.newBuilder() to construct. + private AutoMlImageClassificationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageClassificationMetadata() { + successfulStopReason_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageClassificationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageClassificationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + costMilliNodeHours_ = input.readInt64(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + successfulStopReason_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason} + */ + public enum SuccessfulStopReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + SUCCESSFUL_STOP_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + BUDGET_REACHED(1), + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + MODEL_CONVERGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + public static final int SUCCESSFUL_STOP_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + public static final int BUDGET_REACHED_VALUE = 1; + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + public static final int MODEL_CONVERGED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SuccessfulStopReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SuccessfulStopReason forNumber(int value) { + switch (value) { + case 0: + return SUCCESSFUL_STOP_REASON_UNSPECIFIED; + case 1: + return BUDGET_REACHED; + case 2: + return MODEL_CONVERGED; + 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 SuccessfulStopReason findValueByNumber(int number) { + return SuccessfulStopReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SuccessfulStopReason[] VALUES = values(); + + public static SuccessfulStopReason 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 SuccessfulStopReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason) + } + + public static final int COST_MILLI_NODE_HOURS_FIELD_NUMBER = 1; + private long costMilliNodeHours_; + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + + public static final int SUCCESSFUL_STOP_REASON_FIELD_NUMBER = 2; + private int successfulStopReason_; + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + + 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 (costMilliNodeHours_ != 0L) { + output.writeInt64(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + .SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, successfulStopReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (costMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + .SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, successfulStopReason_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) + obj; + + if (getCostMilliNodeHours() != other.getCostMilliNodeHours()) return false; + if (successfulStopReason_ != other.successfulStopReason_) 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) + COST_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCostMilliNodeHours()); + hash = (37 * hash) + SUCCESSFUL_STOP_REASON_FIELD_NUMBER; + hash = (53 * hash) + successfulStopReason_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.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(); + costMilliNodeHours_ = 0L; + + successfulStopReason_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata(this); + result.costMilliNodeHours_ = costMilliNodeHours_; + result.successfulStopReason_ = successfulStopReason_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance()) return this; + if (other.getCostMilliNodeHours() != 0L) { + setCostMilliNodeHours(other.getCostMilliNodeHours()); + } + if (other.successfulStopReason_ != 0) { + setSuccessfulStopReasonValue(other.getSuccessfulStopReasonValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long costMilliNodeHours_; + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @param value The costMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setCostMilliNodeHours(long value) { + + costMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearCostMilliNodeHours() { + + costMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private int successfulStopReason_ = 0; + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The enum numeric value on the wire for successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReasonValue(int value) { + + successfulStopReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReason( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + value) { + if (value == null) { + throw new NullPointerException(); + } + + successfulStopReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearSuccessfulStopReason() { + + successfulStopReason_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageClassificationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageClassificationMetadata(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java new file mode 100644 index 000000000..0a556d0b5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + long getCostMilliNodeHours(); + + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + int getSuccessfulStopReasonValue(); + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java new file mode 100644 index 000000000..eb178c05d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetection.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetection.java new file mode 100644 index 000000000..9a3c5c217 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetection.java @@ -0,0 +1,1208 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Image Object Detection Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection} + */ +public final class AutoMlImageObjectDetection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection) + AutoMlImageObjectDetectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageObjectDetection.newBuilder() to construct. + private AutoMlImageObjectDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageObjectDetection() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageObjectDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageObjectDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + metadata_; + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + 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 TrainingJob that trains and uploads an AutoML Image Object Detection Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageObjectDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageObjectDetection(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetection + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java new file mode 100644 index 000000000..405069a21 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs} + */ +public final class AutoMlImageObjectDetectionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + AutoMlImageObjectDetectionInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageObjectDetectionInputs.newBuilder() to construct. + private AutoMlImageObjectDetectionInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageObjectDetectionInputs() { + modelType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageObjectDetectionInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageObjectDetectionInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + break; + } + case 16: + { + budgetMilliNodeHours_ = input.readInt64(); + break; + } + case 24: + { + disableEarlyStopping_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Expected to have a higher latency, but should also have a
+     * higher prediction quality than other cloud models.
+     * 
+ * + * CLOUD_HIGH_ACCURACY_1 = 1; + */ + CLOUD_HIGH_ACCURACY_1(1), + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Expected to have a low latency, but may have lower
+     * prediction quality than other cloud models.
+     * 
+ * + * CLOUD_LOW_LATENCY_1 = 2; + */ + CLOUD_LOW_LATENCY_1(2), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud can also be exported (see ModelService.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 mobile models.
+     * 
+ * + * MOBILE_TF_LOW_LATENCY_1 = 3; + */ + MOBILE_TF_LOW_LATENCY_1(3), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud can also be exported (see ModelService.ExportModel) and
+     * used on a mobile or edge device with TensorFlow afterwards.
+     * 
+ * + * MOBILE_TF_VERSATILE_1 = 4; + */ + MOBILE_TF_VERSATILE_1(4), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.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 mobile models.
+     * 
+ * + * MOBILE_TF_HIGH_ACCURACY_1 = 5; + */ + MOBILE_TF_HIGH_ACCURACY_1(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Expected to have a higher latency, but should also have a
+     * higher prediction quality than other cloud models.
+     * 
+ * + * CLOUD_HIGH_ACCURACY_1 = 1; + */ + public static final int CLOUD_HIGH_ACCURACY_1_VALUE = 1; + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Expected to have a low latency, but may have lower
+     * prediction quality than other cloud models.
+     * 
+ * + * CLOUD_LOW_LATENCY_1 = 2; + */ + public static final int CLOUD_LOW_LATENCY_1_VALUE = 2; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud can also be exported (see ModelService.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 mobile models.
+     * 
+ * + * MOBILE_TF_LOW_LATENCY_1 = 3; + */ + public static final int MOBILE_TF_LOW_LATENCY_1_VALUE = 3; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud can also be exported (see ModelService.ExportModel) and
+     * used on a mobile or edge device with TensorFlow afterwards.
+     * 
+ * + * MOBILE_TF_VERSATILE_1 = 4; + */ + public static final int MOBILE_TF_VERSATILE_1_VALUE = 4; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.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 mobile models.
+     * 
+ * + * MOBILE_TF_HIGH_ACCURACY_1 = 5; + */ + public static final int MOBILE_TF_HIGH_ACCURACY_1_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD_HIGH_ACCURACY_1; + case 2: + return CLOUD_LOW_LATENCY_1; + case 3: + return MOBILE_TF_LOW_LATENCY_1; + case 4: + return MOBILE_TF_VERSATILE_1; + case 5: + return MOBILE_TF_HIGH_ACCURACY_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.UNRECOGNIZED + : result; + } + + public static final int BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 2; + private long budgetMilliNodeHours_; + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved.
+   * For modelType `cloud`(default), the budget must be between 20,000
+   * and 900,000 milli node hours, inclusive. The default value is 216,000
+   * which represents one day in wall time, considering 9 nodes are used.
+   * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+   * `mobile-tf-high-accuracy-1`
+   * the training budget must be between 1,000 and 100,000 milli node hours,
+   * inclusive. The default value is 24,000 which represents one day in
+   * wall time on a single node that is used.
+   * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + + public static final int DISABLE_EARLY_STOPPING_FIELD_NUMBER = 3; + private boolean disableEarlyStopping_; + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * When false the early stopping feature is enabled, which means that AutoML
+   * Image Object Detection might stop training before the entire training
+   * budget has been used.
+   * 
+ * + * bool disable_early_stopping = 3; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + + 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + if (budgetMilliNodeHours_ != 0L) { + output.writeInt64(2, budgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + output.writeBool(3, disableEarlyStopping_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + if (budgetMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, budgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, disableEarlyStopping_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) + obj; + + if (modelType_ != other.modelType_) return false; + if (getBudgetMilliNodeHours() != other.getBudgetMilliNodeHours()) return false; + if (getDisableEarlyStopping() != other.getDisableEarlyStopping()) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (37 * hash) + BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBudgetMilliNodeHours()); + hash = (37 * hash) + DISABLE_EARLY_STOPPING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableEarlyStopping()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.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(); + modelType_ = 0; + + budgetMilliNodeHours_ = 0L; + + disableEarlyStopping_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs(this); + result.modelType_ = modelType_; + result.budgetMilliNodeHours_ = budgetMilliNodeHours_; + result.disableEarlyStopping_ = disableEarlyStopping_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + if (other.getBudgetMilliNodeHours() != 0L) { + setBudgetMilliNodeHours(other.getBudgetMilliNodeHours()); + } + if (other.getDisableEarlyStopping() != false) { + setDisableEarlyStopping(other.getDisableEarlyStopping()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 0; + onChanged(); + return this; + } + + private long budgetMilliNodeHours_; + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 20,000
+     * and 900,000 milli node hours, inclusive. The default value is 216,000
+     * which represents one day in wall time, considering 9 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`
+     * the training budget must be between 1,000 and 100,000 milli node hours,
+     * inclusive. The default value is 24,000 which represents one day in
+     * wall time on a single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 20,000
+     * and 900,000 milli node hours, inclusive. The default value is 216,000
+     * which represents one day in wall time, considering 9 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`
+     * the training budget must be between 1,000 and 100,000 milli node hours,
+     * inclusive. The default value is 24,000 which represents one day in
+     * wall time on a single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @param value The budgetMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setBudgetMilliNodeHours(long value) { + + budgetMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved.
+     * For modelType `cloud`(default), the budget must be between 20,000
+     * and 900,000 milli node hours, inclusive. The default value is 216,000
+     * which represents one day in wall time, considering 9 nodes are used.
+     * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+     * `mobile-tf-high-accuracy-1`
+     * the training budget must be between 1,000 and 100,000 milli node hours,
+     * inclusive. The default value is 24,000 which represents one day in
+     * wall time on a single node that is used.
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return This builder for chaining. + */ + public Builder clearBudgetMilliNodeHours() { + + budgetMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private boolean disableEarlyStopping_; + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that AutoML
+     * Image Object Detection might stop training before the entire training
+     * budget has been used.
+     * 
+ * + * bool disable_early_stopping = 3; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that AutoML
+     * Image Object Detection might stop training before the entire training
+     * budget has been used.
+     * 
+ * + * bool disable_early_stopping = 3; + * + * @param value The disableEarlyStopping to set. + * @return This builder for chaining. + */ + public Builder setDisableEarlyStopping(boolean value) { + + disableEarlyStopping_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * When false the early stopping feature is enabled, which means that AutoML
+     * Image Object Detection might stop training before the entire training
+     * budget has been used.
+     * 
+ * + * bool disable_early_stopping = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisableEarlyStopping() { + + disableEarlyStopping_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageObjectDetectionInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageObjectDetectionInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java new file mode 100644 index 000000000..ed43e40d5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + .ModelType + getModelType(); + + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved.
+   * For modelType `cloud`(default), the budget must be between 20,000
+   * and 900,000 milli node hours, inclusive. The default value is 216,000
+   * which represents one day in wall time, considering 9 nodes are used.
+   * For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`,
+   * `mobile-tf-high-accuracy-1`
+   * the training budget must be between 1,000 and 100,000 milli node hours,
+   * inclusive. The default value is 24,000 which represents one day in
+   * wall time on a single node that is used.
+   * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + long getBudgetMilliNodeHours(); + + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * When false the early stopping feature is enabled, which means that AutoML
+   * Image Object Detection might stop training before the entire training
+   * budget has been used.
+   * 
+ * + * bool disable_early_stopping = 3; + * + * @return The disableEarlyStopping. + */ + boolean getDisableEarlyStopping(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java new file mode 100644 index 000000000..f453cbda0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java @@ -0,0 +1,980 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata} + */ +public final class AutoMlImageObjectDetectionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + AutoMlImageObjectDetectionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageObjectDetectionMetadata.newBuilder() to construct. + private AutoMlImageObjectDetectionMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageObjectDetectionMetadata() { + successfulStopReason_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageObjectDetectionMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageObjectDetectionMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + costMilliNodeHours_ = input.readInt64(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + successfulStopReason_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason} + */ + public enum SuccessfulStopReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + SUCCESSFUL_STOP_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + BUDGET_REACHED(1), + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + MODEL_CONVERGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + public static final int SUCCESSFUL_STOP_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + public static final int BUDGET_REACHED_VALUE = 1; + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + public static final int MODEL_CONVERGED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SuccessfulStopReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SuccessfulStopReason forNumber(int value) { + switch (value) { + case 0: + return SUCCESSFUL_STOP_REASON_UNSPECIFIED; + case 1: + return BUDGET_REACHED; + case 2: + return MODEL_CONVERGED; + 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 SuccessfulStopReason findValueByNumber(int number) { + return SuccessfulStopReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SuccessfulStopReason[] VALUES = values(); + + public static SuccessfulStopReason 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 SuccessfulStopReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason) + } + + public static final int COST_MILLI_NODE_HOURS_FIELD_NUMBER = 1; + private long costMilliNodeHours_; + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + + public static final int SUCCESSFUL_STOP_REASON_FIELD_NUMBER = 2; + private int successfulStopReason_; + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + + 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 (costMilliNodeHours_ != 0L) { + output.writeInt64(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + .SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, successfulStopReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (costMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + .SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, successfulStopReason_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) + obj; + + if (getCostMilliNodeHours() != other.getCostMilliNodeHours()) return false; + if (successfulStopReason_ != other.successfulStopReason_) 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) + COST_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCostMilliNodeHours()); + hash = (37 * hash) + SUCCESSFUL_STOP_REASON_FIELD_NUMBER; + hash = (53 * hash) + successfulStopReason_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.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(); + costMilliNodeHours_ = 0L; + + successfulStopReason_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata(this); + result.costMilliNodeHours_ = costMilliNodeHours_; + result.successfulStopReason_ = successfulStopReason_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance()) return this; + if (other.getCostMilliNodeHours() != 0L) { + setCostMilliNodeHours(other.getCostMilliNodeHours()); + } + if (other.successfulStopReason_ != 0) { + setSuccessfulStopReasonValue(other.getSuccessfulStopReasonValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long costMilliNodeHours_; + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @param value The costMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setCostMilliNodeHours(long value) { + + costMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearCostMilliNodeHours() { + + costMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private int successfulStopReason_ = 0; + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The enum numeric value on the wire for successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReasonValue(int value) { + + successfulStopReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReason( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + value) { + if (value == null) { + throw new NullPointerException(); + } + + successfulStopReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearSuccessfulStopReason() { + + successfulStopReason_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageObjectDetectionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageObjectDetectionMetadata(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java new file mode 100644 index 000000000..076f70ff2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + long getCostMilliNodeHours(); + + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + int getSuccessfulStopReasonValue(); + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java new file mode 100644 index 000000000..ecc3429c5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentation.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentation.java new file mode 100644 index 000000000..74fc1ac7f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentation.java @@ -0,0 +1,1204 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Image Segmentation Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation} + */ +public final class AutoMlImageSegmentation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation) + AutoMlImageSegmentationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageSegmentation.newBuilder() to construct. + private AutoMlImageSegmentation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageSegmentation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageSegmentation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageSegmentation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + 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 TrainingJob that trains and uploads an AutoML Image Segmentation Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageSegmentation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageSegmentation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java new file mode 100644 index 000000000..488767233 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java @@ -0,0 +1,1173 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs} + */ +public final class AutoMlImageSegmentationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + AutoMlImageSegmentationInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageSegmentationInputs.newBuilder() to construct. + private AutoMlImageSegmentationInputs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageSegmentationInputs() { + modelType_ = 0; + baseModelId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageSegmentationInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageSegmentationInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + break; + } + case 16: + { + budgetMilliNodeHours_ = input.readInt64(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseModelId_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A model to be used via prediction calls to uCAIP API. Expected
+     * to have a higher latency, but should also have a higher prediction
+     * quality than other models.
+     * 
+ * + * CLOUD_HIGH_ACCURACY_1 = 1; + */ + CLOUD_HIGH_ACCURACY_1(1), + /** + * + * + *
+     * A model to be used via prediction calls to uCAIP API. Expected
+     * to have a lower latency but relatively lower prediction quality.
+     * 
+ * + * CLOUD_LOW_ACCURACY_1 = 2; + */ + CLOUD_LOW_ACCURACY_1(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A model to be used via prediction calls to uCAIP API. Expected
+     * to have a higher latency, but should also have a higher prediction
+     * quality than other models.
+     * 
+ * + * CLOUD_HIGH_ACCURACY_1 = 1; + */ + public static final int CLOUD_HIGH_ACCURACY_1_VALUE = 1; + /** + * + * + *
+     * A model to be used via prediction calls to uCAIP API. Expected
+     * to have a lower latency but relatively lower prediction quality.
+     * 
+ * + * CLOUD_LOW_ACCURACY_1 = 2; + */ + public static final int CLOUD_LOW_ACCURACY_1_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD_HIGH_ACCURACY_1; + case 2: + return CLOUD_LOW_ACCURACY_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.UNRECOGNIZED + : result; + } + + public static final int BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 2; + private long budgetMilliNodeHours_; + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved. Or
+   * actaul_wall_clock_hours = train_budget_milli_node_hours /
+   *                           (number_of_nodes_involved * 1000)
+   * For modelType `cloud-high-accuracy-1`(default), the budget must be between
+   * 20,000 and 2,000,000 milli node hours, inclusive. The default value is
+   * 192,000 which represents one day in wall time
+   * (1000 milli * 24 hours * 8 nodes).
+   * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + + public static final int BASE_MODEL_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object baseModelId_; + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 3; + * + * @return The baseModelId. + */ + @java.lang.Override + public java.lang.String getBaseModelId() { + java.lang.Object ref = baseModelId_; + 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(); + baseModelId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 3; + * + * @return The bytes for baseModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseModelIdBytes() { + java.lang.Object ref = baseModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModelId_ = 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + if (budgetMilliNodeHours_ != 0L) { + output.writeInt64(2, budgetMilliNodeHours_); + } + if (!getBaseModelIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseModelId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + if (budgetMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, budgetMilliNodeHours_); + } + if (!getBaseModelIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseModelId_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) + obj; + + if (modelType_ != other.modelType_) return false; + if (getBudgetMilliNodeHours() != other.getBudgetMilliNodeHours()) return false; + if (!getBaseModelId().equals(other.getBaseModelId())) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (37 * hash) + BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBudgetMilliNodeHours()); + hash = (37 * hash) + BASE_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getBaseModelId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.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(); + modelType_ = 0; + + budgetMilliNodeHours_ = 0L; + + baseModelId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs(this); + result.modelType_ = modelType_; + result.budgetMilliNodeHours_ = budgetMilliNodeHours_; + result.baseModelId_ = baseModelId_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + if (other.getBudgetMilliNodeHours() != 0L) { + setBudgetMilliNodeHours(other.getBudgetMilliNodeHours()); + } + if (!other.getBaseModelId().isEmpty()) { + baseModelId_ = other.baseModelId_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 0; + onChanged(); + return this; + } + + private long budgetMilliNodeHours_; + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved. Or
+     * actaul_wall_clock_hours = train_budget_milli_node_hours /
+     *                           (number_of_nodes_involved * 1000)
+     * For modelType `cloud-high-accuracy-1`(default), the budget must be between
+     * 20,000 and 2,000,000 milli node hours, inclusive. The default value is
+     * 192,000 which represents one day in wall time
+     * (1000 milli * 24 hours * 8 nodes).
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + @java.lang.Override + public long getBudgetMilliNodeHours() { + return budgetMilliNodeHours_; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved. Or
+     * actaul_wall_clock_hours = train_budget_milli_node_hours /
+     *                           (number_of_nodes_involved * 1000)
+     * For modelType `cloud-high-accuracy-1`(default), the budget must be between
+     * 20,000 and 2,000,000 milli node hours, inclusive. The default value is
+     * 192,000 which represents one day in wall time
+     * (1000 milli * 24 hours * 8 nodes).
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @param value The budgetMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setBudgetMilliNodeHours(long value) { + + budgetMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The training budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour. The actual
+     * metadata.costMilliNodeHours will be equal or less than this value.
+     * If further model training ceases to provide any improvements, it will
+     * stop without using the full budget and the metadata.successfulStopReason
+     * will be `model-converged`.
+     * Note, node_hour  = actual_hour * number_of_nodes_involved. Or
+     * actaul_wall_clock_hours = train_budget_milli_node_hours /
+     *                           (number_of_nodes_involved * 1000)
+     * For modelType `cloud-high-accuracy-1`(default), the budget must be between
+     * 20,000 and 2,000,000 milli node hours, inclusive. The default value is
+     * 192,000 which represents one day in wall time
+     * (1000 milli * 24 hours * 8 nodes).
+     * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return This builder for chaining. + */ + public Builder clearBudgetMilliNodeHours() { + + budgetMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object baseModelId_ = ""; + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 3; + * + * @return The baseModelId. + */ + public java.lang.String getBaseModelId() { + java.lang.Object ref = baseModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 3; + * + * @return The bytes for baseModelId. + */ + public com.google.protobuf.ByteString getBaseModelIdBytes() { + java.lang.Object ref = baseModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 3; + * + * @param value The baseModelId to set. + * @return This builder for chaining. + */ + public Builder setBaseModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseModelId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBaseModelId() { + + baseModelId_ = getDefaultInstance().getBaseModelId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the `base` model. If it is specified, the new model will be
+     * trained based on the `base` model. Otherwise, the new model will be
+     * trained from scratch. The `base` model must be in the same
+     * Project and Location as the new Model to train, and have the same
+     * modelType.
+     * 
+ * + * string base_model_id = 3; + * + * @param value The bytes for baseModelId to set. + * @return This builder for chaining. + */ + public Builder setBaseModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseModelId_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageSegmentationInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageSegmentationInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java new file mode 100644 index 000000000..6879681d9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + getModelType(); + + /** + * + * + *
+   * The training budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour. The actual
+   * metadata.costMilliNodeHours will be equal or less than this value.
+   * If further model training ceases to provide any improvements, it will
+   * stop without using the full budget and the metadata.successfulStopReason
+   * will be `model-converged`.
+   * Note, node_hour  = actual_hour * number_of_nodes_involved. Or
+   * actaul_wall_clock_hours = train_budget_milli_node_hours /
+   *                           (number_of_nodes_involved * 1000)
+   * For modelType `cloud-high-accuracy-1`(default), the budget must be between
+   * 20,000 and 2,000,000 milli node hours, inclusive. The default value is
+   * 192,000 which represents one day in wall time
+   * (1000 milli * 24 hours * 8 nodes).
+   * 
+ * + * int64 budget_milli_node_hours = 2; + * + * @return The budgetMilliNodeHours. + */ + long getBudgetMilliNodeHours(); + + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 3; + * + * @return The baseModelId. + */ + java.lang.String getBaseModelId(); + /** + * + * + *
+   * The ID of the `base` model. If it is specified, the new model will be
+   * trained based on the `base` model. Otherwise, the new model will be
+   * trained from scratch. The `base` model must be in the same
+   * Project and Location as the new Model to train, and have the same
+   * modelType.
+   * 
+ * + * string base_model_id = 3; + * + * @return The bytes for baseModelId. + */ + com.google.protobuf.ByteString getBaseModelIdBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java new file mode 100644 index 000000000..2bdc98aa2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java @@ -0,0 +1,978 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata} + */ +public final class AutoMlImageSegmentationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + AutoMlImageSegmentationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlImageSegmentationMetadata.newBuilder() to construct. + private AutoMlImageSegmentationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlImageSegmentationMetadata() { + successfulStopReason_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlImageSegmentationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlImageSegmentationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + costMilliNodeHours_ = input.readInt64(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + successfulStopReason_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason} + */ + public enum SuccessfulStopReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + SUCCESSFUL_STOP_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + BUDGET_REACHED(1), + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + MODEL_CONVERGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + */ + public static final int SUCCESSFUL_STOP_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The inputs.budgetMilliNodeHours had been reached.
+     * 
+ * + * BUDGET_REACHED = 1; + */ + public static final int BUDGET_REACHED_VALUE = 1; + /** + * + * + *
+     * Further training of the Model ceased to increase its quality, since it
+     * already has converged.
+     * 
+ * + * MODEL_CONVERGED = 2; + */ + public static final int MODEL_CONVERGED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SuccessfulStopReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SuccessfulStopReason forNumber(int value) { + switch (value) { + case 0: + return SUCCESSFUL_STOP_REASON_UNSPECIFIED; + case 1: + return BUDGET_REACHED; + case 2: + return MODEL_CONVERGED; + 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 SuccessfulStopReason findValueByNumber(int number) { + return SuccessfulStopReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SuccessfulStopReason[] VALUES = values(); + + public static SuccessfulStopReason 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 SuccessfulStopReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason) + } + + public static final int COST_MILLI_NODE_HOURS_FIELD_NUMBER = 1; + private long costMilliNodeHours_; + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + + public static final int SUCCESSFUL_STOP_REASON_FIELD_NUMBER = 2; + private int successfulStopReason_; + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + + 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 (costMilliNodeHours_ != 0L) { + output.writeInt64(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, successfulStopReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (costMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, costMilliNodeHours_); + } + if (successfulStopReason_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.SUCCESSFUL_STOP_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, successfulStopReason_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) + obj; + + if (getCostMilliNodeHours() != other.getCostMilliNodeHours()) return false; + if (successfulStopReason_ != other.successfulStopReason_) 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) + COST_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCostMilliNodeHours()); + hash = (37 * hash) + SUCCESSFUL_STOP_REASON_FIELD_NUMBER; + hash = (53 * hash) + successfulStopReason_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.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(); + costMilliNodeHours_ = 0L; + + successfulStopReason_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata(this); + result.costMilliNodeHours_ = costMilliNodeHours_; + result.successfulStopReason_ = successfulStopReason_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance()) return this; + if (other.getCostMilliNodeHours() != 0L) { + setCostMilliNodeHours(other.getCostMilliNodeHours()); + } + if (other.successfulStopReason_ != 0) { + setSuccessfulStopReasonValue(other.getSuccessfulStopReasonValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long costMilliNodeHours_; + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + @java.lang.Override + public long getCostMilliNodeHours() { + return costMilliNodeHours_; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @param value The costMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setCostMilliNodeHours(long value) { + + costMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual training cost of creating this model, expressed in
+     * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+     * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+     * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearCostMilliNodeHours() { + + costMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private int successfulStopReason_ = 0; + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + @java.lang.Override + public int getSuccessfulStopReasonValue() { + return successfulStopReason_; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The enum numeric value on the wire for successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReasonValue(int value) { + + successfulStopReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @param value The successfulStopReason to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulStopReason( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + value) { + if (value == null) { + throw new NullPointerException(); + } + + successfulStopReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearSuccessfulStopReason() { + + successfulStopReason_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlImageSegmentationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlImageSegmentationMetadata(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java new file mode 100644 index 000000000..0d52e1822 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The actual training cost of creating this model, expressed in
+   * milli node hours, i.e. 1,000 value in this field means 1 node hour.
+   * Guaranteed to not exceed inputs.budgetMilliNodeHours.
+   * 
+ * + * int64 cost_milli_node_hours = 1; + * + * @return The costMilliNodeHours. + */ + long getCostMilliNodeHours(); + + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The enum numeric value on the wire for successfulStopReason. + */ + int getSuccessfulStopReasonValue(); + /** + * + * + *
+   * For successful job completions, this is the reason why the job has
+   * finished.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + .SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java new file mode 100644 index 000000000..393339ace --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTables.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTables.java new file mode 100644 index 000000000..b380a10b8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTables.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Tables Model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables} + */ +public final class AutoMlTables extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + AutoMlTablesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTables.newBuilder() to construct. + private AutoMlTables(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTables() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTables(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTables( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables.Builder + .class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables 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 TrainingJob that trains and uploads an AutoML Tables Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + .getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder>(getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTables + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTables parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTables(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputs.java new file mode 100644 index 000000000..5443dd4d6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputs.java @@ -0,0 +1,12530 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs} + */ +public final class AutoMlTablesInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + AutoMlTablesInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTablesInputs.newBuilder() to construct. + private AutoMlTablesInputs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTablesInputs() { + predictionType_ = ""; + targetColumn_ = ""; + transformations_ = java.util.Collections.emptyList(); + optimizationObjective_ = ""; + weightColumnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTablesInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTablesInputs( + 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(); + + predictionType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetColumn_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation>(); + mutable_bitField0_ |= 0x00000001; + } + transformations_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + optimizationObjective_ = s; + break; + } + case 45: + { + additionalOptimizationObjectiveConfigCase_ = 5; + additionalOptimizationObjectiveConfig_ = input.readFloat(); + break; + } + case 53: + { + additionalOptimizationObjectiveConfigCase_ = 6; + additionalOptimizationObjectiveConfig_ = input.readFloat(); + break; + } + case 56: + { + trainBudgetMilliNodeHours_ = input.readInt64(); + break; + } + case 64: + { + disableEarlyStopping_ = input.readBool(); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + weightColumnName_ = s; + break; + } + case 82: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + subBuilder = null; + if (exportEvaluatedDataItemsConfig_ != null) { + subBuilder = exportEvaluatedDataItemsConfig_.toBuilder(); + } + exportEvaluatedDataItemsConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(exportEvaluatedDataItemsConfig_); + exportEvaluatedDataItemsConfig_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder.class); + } + + public interface TransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + boolean hasAuto(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getAuto(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + boolean hasNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + boolean hasCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getTimestamp(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + boolean hasRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + boolean hasRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + boolean hasRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder(); + + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TransformationDetailCase + getTransformationDetailCase(); + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation} + */ + public static final class Transformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + TransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transformation.newBuilder() to construct. + private Transformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transformation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 1; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 4; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 5) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 5; + break; + } + case 50: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 6) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 6; + break; + } + case 58: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 7) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 7; + break; + } + case 66: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 8) { + subBuilder = + ((com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 8; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder.class); + } + + public interface AutoTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will infer the proper transformation based on the
+     * statistic of dataset.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation} + */ + public static final class AutoTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + AutoTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoTransformation.newBuilder() to construct. + private AutoTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will infer the proper transformation based on the
+       * statistic of dataset.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The value converted to float32.
+     * *  The z_score of the value.
+     * *  log(value+1) when the value is greater than or equal to 0. Otherwise,
+     *    this transformation is not applied and the value is considered a
+     *    missing value.
+     * *  z_score of log(value+1) when the value is greater than or equal to 0.
+     *    Otherwise, this transformation is not applied and the value is
+     *    considered a missing value.
+     * *  A boolean value that indicates whether the value is valid.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation} + */ + public static final class NumericTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + NumericTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericTransformation.newBuilder() to construct. + private NumericTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 16: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 2; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(2, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The value converted to float32.
+       * *  The z_score of the value.
+       * *  log(value+1) when the value is greater than or equal to 0. Otherwise,
+       *    this transformation is not applied and the value is considered a
+       *    missing value.
+       * *  z_score of log(value+1) when the value is greater than or equal to 0.
+       *    Otherwise, this transformation is not applied and the value is
+       *    considered a missing value.
+       * *  A boolean value that indicates whether the value is valid.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation.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(); + columnName_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation(this); + result.columnName_ = columnName_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The categorical string as is--no change to case, punctuation,
+     * spelling,
+     *    tense, and so on.
+     * *  Convert the category name to a dictionary lookup index and generate an
+     *    embedding for each index.
+     * *  Categories that appear less than 5 times in the training dataset are
+     *    treated as the "unknown" category. The "unknown" category gets its own
+     *    special lookup index and resulting embedding.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation} + */ + public static final class CategoricalTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + CategoricalTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalTransformation.newBuilder() to construct. + private CategoricalTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The categorical string as is--no change to case, punctuation,
+       * spelling,
+       *    tense, and so on.
+       * *  Convert the category name to a dictionary lookup index and generate an
+       *    embedding for each index.
+       * *  Categories that appear less than 5 times in the training dataset are
+       *    treated as the "unknown" category. The "unknown" category gets its own
+       *    special lookup index and resulting embedding.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimestampTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + java.lang.String getTimeFormat(); + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + com.google.protobuf.ByteString getTimeFormatBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  Apply the transformation functions for Numerical columns.
+     * *  Determine the year, month, day,and weekday. Treat each value from the
+     * *  timestamp as a Categorical column.
+     * *  Invalid numerical values (for example, values that fall outside of a
+     *    typical timestamp range, or are extreme values) receive no special
+     *    treatment and are not removed.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation} + */ + public static final class TimestampTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + TimestampTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimestampTransformation.newBuilder() to construct. + private TimestampTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimestampTransformation() { + columnName_ = ""; + timeFormat_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimestampTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimestampTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeFormat_ = s; + break; + } + case 24: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FORMAT_FIELD_NUMBER = 2; + private volatile java.lang.Object timeFormat_; + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + @java.lang.Override + public java.lang.String getTimeFormat() { + java.lang.Object ref = timeFormat_; + 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(); + timeFormat_ = s; + return s; + } + } + /** + * + * + *
+       * The format in which that time field is expressed. The time_format must
+       * either be one of:
+       * * `unix-seconds`
+       * * `unix-milliseconds`
+       * * `unix-microseconds`
+       * * `unix-nanoseconds`
+       * (for respectively number of seconds, milliseconds, microseconds and
+       * nanoseconds since start of the Unix epoch);
+       * or be written in `strftime` syntax. If time_format is not set, then the
+       * default format is RFC 3339 `date-time` format, where
+       * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+       * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeFormatBytes() { + java.lang.Object ref = timeFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 3; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (!getTimeFormatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeFormat_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(3, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (!getTimeFormatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeFormat_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (!getTimeFormat().equals(other.getTimeFormat())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + TIME_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getTimeFormat().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  Apply the transformation functions for Numerical columns.
+       * *  Determine the year, month, day,and weekday. Treat each value from the
+       * *  timestamp as a Categorical column.
+       * *  Invalid numerical values (for example, values that fall outside of a
+       *    typical timestamp range, or are extreme values) receive no special
+       *    treatment and are not removed.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation.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(); + columnName_ = ""; + + timeFormat_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation(this); + result.columnName_ = columnName_; + result.timeFormat_ = timeFormat_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (!other.getTimeFormat().isEmpty()) { + timeFormat_ = other.timeFormat_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeFormat_ = ""; + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return The timeFormat. + */ + public java.lang.String getTimeFormat() { + java.lang.Object ref = timeFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return The bytes for timeFormat. + */ + public com.google.protobuf.ByteString getTimeFormatBytes() { + java.lang.Object ref = timeFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @param value The timeFormat to set. + * @return This builder for chaining. + */ + public Builder setTimeFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @return This builder for chaining. + */ + public Builder clearTimeFormat() { + + timeFormat_ = getDefaultInstance().getTimeFormat(); + onChanged(); + return this; + } + /** + * + * + *
+         * The format in which that time field is expressed. The time_format must
+         * either be one of:
+         * * `unix-seconds`
+         * * `unix-milliseconds`
+         * * `unix-microseconds`
+         * * `unix-nanoseconds`
+         * (for respectively number of seconds, milliseconds, microseconds and
+         * nanoseconds since start of the Unix epoch);
+         * or be written in `strftime` syntax. If time_format is not set, then the
+         * default format is RFC 3339 `date-time` format, where
+         * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z)
+         * 
+ * + * string time_format = 2; + * + * @param value The bytes for timeFormat to set. + * @return This builder for chaining. + */ + public Builder setTimeFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeFormat_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 3; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimestampTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimestampTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Training pipeline will perform following transformation functions.
+     * *  The text as is--no change to case, punctuation, spelling, tense, and
+     * so
+     *    on.
+     * *  Tokenize text to words. Convert each words to a dictionary lookup
+     * index
+     *    and generate an embedding for each index. Combine the embedding of all
+     *    elements into a single embedding using the mean.
+     * *  Tokenization is based on unicode script boundaries.
+     * *  Missing values get their own lookup index and resulting embedding.
+     * *  Stop-words receive no special treatment and are not removed.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation} + */ + public static final class TextTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + TextTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextTransformation.newBuilder() to construct. + private TextTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + 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; + } + /** + * + * + *
+       * Training pipeline will perform following transformation functions.
+       * *  The text as is--no change to case, punctuation, spelling, tense, and
+       * so
+       *    on.
+       * *  Tokenize text to words. Convert each words to a dictionary lookup
+       * index
+       *    and generate an embedding for each index. Combine the embedding of all
+       *    elements into a single embedding using the mean.
+       * *  Tokenization is based on unicode script boundaries.
+       * *  Missing values get their own lookup index and resulting embedding.
+       * *  Stop-words receive no special treatment and are not removed.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + boolean getInvalidValuesAllowed(); + } + /** + * + * + *
+     * Treats the column as numerical array and performs following
+     * transformation functions.
+     * *  All transformations for Numerical types applied to the average of the
+     *    all elements.
+     * *  The average of empty arrays is treated as zero.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation} + */ + public static final class NumericArrayTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + NumericArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericArrayTransformation.newBuilder() to construct. + private NumericArrayTransformation( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 16: + { + invalidValuesAllowed_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVALID_VALUES_ALLOWED_FIELD_NUMBER = 2; + private boolean invalidValuesAllowed_; + /** + * + * + *
+       * If invalid values is allowed, the training pipeline will create a
+       * boolean feature that indicated whether the value is valid.
+       * Otherwise, the training pipeline will discard the input row from
+       * trainining data.
+       * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + + 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + if (invalidValuesAllowed_ != false) { + output.writeBool(2, invalidValuesAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + if (invalidValuesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, invalidValuesAllowed_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) return false; + if (getInvalidValuesAllowed() != other.getInvalidValuesAllowed()) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (37 * hash) + INVALID_VALUES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvalidValuesAllowed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as numerical array and performs following
+       * transformation functions.
+       * *  All transformations for Numerical types applied to the average of the
+       *    all elements.
+       * *  The average of empty arrays is treated as zero.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation.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(); + columnName_ = ""; + + invalidValuesAllowed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation(this); + result.columnName_ = columnName_; + result.invalidValuesAllowed_ = invalidValuesAllowed_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + onChanged(); + } + if (other.getInvalidValuesAllowed() != false) { + setInvalidValuesAllowed(other.getInvalidValuesAllowed()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = value; + onChanged(); + return this; + } + + private boolean invalidValuesAllowed_; + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return The invalidValuesAllowed. + */ + @java.lang.Override + public boolean getInvalidValuesAllowed() { + return invalidValuesAllowed_; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @param value The invalidValuesAllowed to set. + * @return This builder for chaining. + */ + public Builder setInvalidValuesAllowed(boolean value) { + + invalidValuesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * If invalid values is allowed, the training pipeline will create a
+         * boolean feature that indicated whether the value is valid.
+         * Otherwise, the training pipeline will discard the input row from
+         * trainining data.
+         * 
+ * + * bool invalid_values_allowed = 2; + * + * @return This builder for chaining. + */ + public Builder clearInvalidValuesAllowed() { + + invalidValuesAllowed_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Treats the column as categorical array and performs following
+     * transformation functions.
+     * *  For each element in the array, convert the category name to a
+     * dictionary
+     *    lookup index and generate an embedding for each index.
+     *    Combine the embedding of all elements into a single embedding using
+     *    the mean.
+     * *  Empty arrays treated as an embedding of zeroes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation} + */ + public static final class CategoricalArrayTransformation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + CategoricalArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalArrayTransformation.newBuilder() to construct. + private CategoricalArrayTransformation( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as categorical array and performs following
+       * transformation functions.
+       * *  For each element in the array, convert the category name to a
+       * dictionary
+       *    lookup index and generate an embedding for each index.
+       *    Combine the embedding of all elements into a single embedding using
+       *    the mean.
+       * *  Empty arrays treated as an embedding of zeroes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance()) return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string column_name = 1; + * + * @return The columnName. + */ + java.lang.String getColumnName(); + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + com.google.protobuf.ByteString getColumnNameBytes(); + } + /** + * + * + *
+     * Treats the column as text array and performs following transformation
+     * functions.
+     * *  Concatenate all text values in the array into a single text value
+     * using
+     *    a space (" ") as a delimiter, and then treat the result as a single
+     *    text value. Apply the transformations for Text columns.
+     * *  Empty arrays treated as an empty text.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation} + */ + public static final class TextArrayTransformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + TextArrayTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextArrayTransformation.newBuilder() to construct. + private TextArrayTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextArrayTransformation() { + columnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextArrayTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextArrayTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder.class); + } + + public static final int COLUMN_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object columnName_; + /** + * string column_name = 1; + * + * @return The columnName. + */ + @java.lang.Override + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + 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(); + columnName_ = s; + return s; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = 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 (!getColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + obj; + + if (!getColumnName().equals(other.getColumnName())) 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) + COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getColumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + 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; + } + /** + * + * + *
+       * Treats the column as text array and performs following transformation
+       * functions.
+       * *  Concatenate all text values in the array into a single text value
+       * using
+       *    a space (" ") as a delimiter, and then treat the result as a single
+       *    text value. Apply the transformations for Text columns.
+       * *  Empty arrays treated as an empty text.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation.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(); + columnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation(this); + result.columnName_ = columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.getDefaultInstance()) + return this; + if (!other.getColumnName().isEmpty()) { + columnName_ = other.columnName_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object columnName_ = ""; + /** + * string column_name = 1; + * + * @return The columnName. + */ + public java.lang.String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + columnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string column_name = 1; + * + * @return The bytes for columnName. + */ + public com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string column_name = 1; + * + * @param value The columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + columnName_ = value; + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumnName() { + + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + /** + * string column_name = 1; + * + * @param value The bytes for columnName to set. + * @return This builder for chaining. + */ + public Builder setColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + columnName_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextArrayTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextArrayTransformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int transformationDetailCase_ = 0; + private java.lang.Object transformationDetail_; + + public enum TransformationDetailCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUTO(1), + NUMERIC(2), + CATEGORICAL(3), + TIMESTAMP(4), + TEXT(5), + REPEATED_NUMERIC(6), + REPEATED_CATEGORICAL(7), + REPEATED_TEXT(8), + TRANSFORMATIONDETAIL_NOT_SET(0); + private final int value; + + private TransformationDetailCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationDetailCase valueOf(int value) { + return forNumber(value); + } + + public static TransformationDetailCase forNumber(int value) { + switch (value) { + case 1: + return AUTO; + case 2: + return NUMERIC; + case 3: + return CATEGORICAL; + case 4: + return TIMESTAMP; + case 5: + return TEXT; + case 6: + return REPEATED_NUMERIC; + case 7: + return REPEATED_CATEGORICAL; + case 8: + return REPEATED_TEXT; + case 0: + return TRANSFORMATIONDETAIL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransformationDetailCase getTransformationDetailCase() { + return TransformationDetailCase.forNumber(transformationDetailCase_); + } + + public static final int AUTO_FIELD_NUMBER = 1; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + @java.lang.Override + public boolean hasAuto() { + return transformationDetailCase_ == 1; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getAuto() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + + public static final int NUMERIC_FIELD_NUMBER = 2; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + @java.lang.Override + public boolean hasNumeric() { + return transformationDetailCase_ == 2; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getNumeric() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + + public static final int CATEGORICAL_FIELD_NUMBER = 3; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + @java.lang.Override + public boolean hasCategorical() { + return transformationDetailCase_ == 3; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getCategorical() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 4; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return transformationDetailCase_ == 4; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getTimestamp() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + + public static final int TEXT_FIELD_NUMBER = 5; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return transformationDetailCase_ == 5; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getText() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + + public static final int REPEATED_NUMERIC_FIELD_NUMBER = 6; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + @java.lang.Override + public boolean hasRepeatedNumeric() { + return transformationDetailCase_ == 6; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + + public static final int REPEATED_CATEGORICAL_FIELD_NUMBER = 7; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + @java.lang.Override + public boolean hasRepeatedCategorical() { + return transformationDetailCase_ == 7; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + + public static final int REPEATED_TEXT_FIELD_NUMBER = 8; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + @java.lang.Override + public boolean hasRepeatedText() { + return transformationDetailCase_ == 8; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getRepeatedText() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.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 (transformationDetailCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + output.writeMessage( + 8, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationDetailCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) + obj; + + if (!getTransformationDetailCase().equals(other.getTransformationDetailCase())) return false; + switch (transformationDetailCase_) { + case 1: + if (!getAuto().equals(other.getAuto())) return false; + break; + case 2: + if (!getNumeric().equals(other.getNumeric())) return false; + break; + case 3: + if (!getCategorical().equals(other.getCategorical())) return false; + break; + case 4: + if (!getTimestamp().equals(other.getTimestamp())) return false; + break; + case 5: + if (!getText().equals(other.getText())) return false; + break; + case 6: + if (!getRepeatedNumeric().equals(other.getRepeatedNumeric())) return false; + break; + case 7: + if (!getRepeatedCategorical().equals(other.getRepeatedCategorical())) return false; + break; + case 8: + if (!getRepeatedText().equals(other.getRepeatedText())) 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 (transformationDetailCase_) { + case 1: + hash = (37 * hash) + AUTO_FIELD_NUMBER; + hash = (53 * hash) + getAuto().hashCode(); + break; + case 2: + hash = (37 * hash) + NUMERIC_FIELD_NUMBER; + hash = (53 * hash) + getNumeric().hashCode(); + break; + case 3: + hash = (37 * hash) + CATEGORICAL_FIELD_NUMBER; + hash = (53 * hash) + getCategorical().hashCode(); + break; + case 4: + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + break; + case 5: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 6: + hash = (37 * hash) + REPEATED_NUMERIC_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedNumeric().hashCode(); + break; + case 7: + hash = (37 * hash) + REPEATED_CATEGORICAL_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedCategorical().hashCode(); + break; + case 8: + hash = (37 * hash) + REPEATED_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getRepeatedText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.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(); + transformationDetailCase_ = 0; + transformationDetail_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation(this); + if (transformationDetailCase_ == 1) { + if (autoBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = autoBuilder_.build(); + } + } + if (transformationDetailCase_ == 2) { + if (numericBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = numericBuilder_.build(); + } + } + if (transformationDetailCase_ == 3) { + if (categoricalBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = categoricalBuilder_.build(); + } + } + if (transformationDetailCase_ == 4) { + if (timestampBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = timestampBuilder_.build(); + } + } + if (transformationDetailCase_ == 5) { + if (textBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = textBuilder_.build(); + } + } + if (transformationDetailCase_ == 6) { + if (repeatedNumericBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedNumericBuilder_.build(); + } + } + if (transformationDetailCase_ == 7) { + if (repeatedCategoricalBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedCategoricalBuilder_.build(); + } + } + if (transformationDetailCase_ == 8) { + if (repeatedTextBuilder_ == null) { + result.transformationDetail_ = transformationDetail_; + } else { + result.transformationDetail_ = repeatedTextBuilder_.build(); + } + } + result.transformationDetailCase_ = transformationDetailCase_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.getDefaultInstance()) return this; + switch (other.getTransformationDetailCase()) { + case AUTO: + { + mergeAuto(other.getAuto()); + break; + } + case NUMERIC: + { + mergeNumeric(other.getNumeric()); + break; + } + case CATEGORICAL: + { + mergeCategorical(other.getCategorical()); + break; + } + case TIMESTAMP: + { + mergeTimestamp(other.getTimestamp()); + break; + } + case TEXT: + { + mergeText(other.getText()); + break; + } + case REPEATED_NUMERIC: + { + mergeRepeatedNumeric(other.getRepeatedNumeric()); + break; + } + case REPEATED_CATEGORICAL: + { + mergeRepeatedCategorical(other.getRepeatedCategorical()); + break; + } + case REPEATED_TEXT: + { + mergeRepeatedText(other.getRepeatedText()); + break; + } + case TRANSFORMATIONDETAIL_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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int transformationDetailCase_ = 0; + private java.lang.Object transformationDetail_; + + public TransformationDetailCase getTransformationDetailCase() { + return TransformationDetailCase.forNumber(transformationDetailCase_); + } + + public Builder clearTransformationDetail() { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder> + autoBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + @java.lang.Override + public boolean hasAuto() { + return transformationDetailCase_ == 1; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getAuto() { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 1) { + return autoBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + value) { + if (autoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + autoBuilder_.setMessage(value); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder + builderForValue) { + if (autoBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + autoBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder mergeAuto( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + value) { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 1) { + autoBuilder_.mergeFrom(value); + } + autoBuilder_.setMessage(value); + } + transformationDetailCase_ = 1; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder clearAuto() { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 1) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + autoBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder + getAutoBuilder() { + return getAutoFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if ((transformationDetailCase_ == 1) && (autoBuilder_ != null)) { + return autoBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder> + getAutoFieldBuilder() { + if (autoBuilder_ == null) { + if (!(transformationDetailCase_ == 1)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + autoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 1; + onChanged(); + ; + return autoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder> + numericBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + @java.lang.Override + public boolean hasNumeric() { + return transformationDetailCase_ == 2; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getNumeric() { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 2) { + return numericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + value) { + if (numericBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + numericBuilder_.setMessage(value); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder + builderForValue) { + if (numericBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + numericBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder mergeNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + value) { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 2) { + numericBuilder_.mergeFrom(value); + } + numericBuilder_.setMessage(value); + } + transformationDetailCase_ = 2; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder clearNumeric() { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 2) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + numericBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder + getNumericBuilder() { + return getNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if ((transformationDetailCase_ == 2) && (numericBuilder_ != null)) { + return numericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder> + getNumericFieldBuilder() { + if (numericBuilder_ == null) { + if (!(transformationDetailCase_ == 2)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + numericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 2; + onChanged(); + ; + return numericBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder> + categoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + @java.lang.Override + public boolean hasCategorical() { + return transformationDetailCase_ == 3; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getCategorical() { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 3) { + return categoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + value) { + if (categoricalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + categoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder + builderForValue) { + if (categoricalBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + categoricalBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder mergeCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + value) { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 3) { + categoricalBuilder_.mergeFrom(value); + } + categoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 3; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder clearCategorical() { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 3) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + categoricalBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder + getCategoricalBuilder() { + return getCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if ((transformationDetailCase_ == 3) && (categoricalBuilder_ != null)) { + return categoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder> + getCategoricalFieldBuilder() { + if (categoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 3)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + categoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 3; + onChanged(); + ; + return categoricalBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder> + timestampBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return transformationDetailCase_ == 4; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getTimestamp() { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 4) { + return timestampBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder + builderForValue) { + if (timestampBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder mergeTimestamp( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + value) { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 4) { + timestampBuilder_.mergeFrom(value); + } + timestampBuilder_.setMessage(value); + } + transformationDetailCase_ = 4; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 4) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + timestampBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder + getTimestampBuilder() { + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if ((transformationDetailCase_ == 4) && (timestampBuilder_ != null)) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + if (!(transformationDetailCase_ == 4)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 4; + onChanged(); + ; + return timestampBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder> + textBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return transformationDetailCase_ == 5; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getText() { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 5) { + return textBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder + builderForValue) { + if (textBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder mergeText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + value) { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 5) { + textBuilder_.mergeFrom(value); + } + textBuilder_.setMessage(value); + } + transformationDetailCase_ = 5; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder clearText() { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 5) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + textBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder + getTextBuilder() { + return getTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if ((transformationDetailCase_ == 5) && (textBuilder_ != null)) { + return textBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + if (!(transformationDetailCase_ == 5)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + textBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 5; + onChanged(); + ; + return textBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder> + repeatedNumericBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + @java.lang.Override + public boolean hasRepeatedNumeric() { + return transformationDetailCase_ == 6; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 6) { + return repeatedNumericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + value) { + if (repeatedNumericBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedNumericBuilder_.setMessage(value); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder + builderForValue) { + if (repeatedNumericBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedNumericBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder mergeRepeatedNumeric( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + value) { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 6) { + repeatedNumericBuilder_.mergeFrom(value); + } + repeatedNumericBuilder_.setMessage(value); + } + transformationDetailCase_ = 6; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder clearRepeatedNumeric() { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 6) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedNumericBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder + getRepeatedNumericBuilder() { + return getRepeatedNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if ((transformationDetailCase_ == 6) && (repeatedNumericBuilder_ != null)) { + return repeatedNumericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder> + getRepeatedNumericFieldBuilder() { + if (repeatedNumericBuilder_ == null) { + if (!(transformationDetailCase_ == 6)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + repeatedNumericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 6; + onChanged(); + ; + return repeatedNumericBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder> + repeatedCategoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + @java.lang.Override + public boolean hasRepeatedCategorical() { + return transformationDetailCase_ == 7; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } else { + if (transformationDetailCase_ == 7) { + return repeatedCategoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + value) { + if (repeatedCategoricalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedCategoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder + builderForValue) { + if (repeatedCategoricalBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedCategoricalBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder mergeRepeatedCategorical( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + value) { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 7) { + repeatedCategoricalBuilder_.mergeFrom(value); + } + repeatedCategoricalBuilder_.setMessage(value); + } + transformationDetailCase_ = 7; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder clearRepeatedCategorical() { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 7) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedCategoricalBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder + getRepeatedCategoricalBuilder() { + return getRepeatedCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if ((transformationDetailCase_ == 7) && (repeatedCategoricalBuilder_ != null)) { + return repeatedCategoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder> + getRepeatedCategoricalFieldBuilder() { + if (repeatedCategoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 7)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + repeatedCategoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 7; + onChanged(); + ; + return repeatedCategoricalBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder> + repeatedTextBuilder_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + @java.lang.Override + public boolean hasRepeatedText() { + return transformationDetailCase_ == 8; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getRepeatedText() { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 8) { + return repeatedTextBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + value) { + if (repeatedTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetail_ = value; + onChanged(); + } else { + repeatedTextBuilder_.setMessage(value); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder + builderForValue) { + if (repeatedTextBuilder_ == null) { + transformationDetail_ = builderForValue.build(); + onChanged(); + } else { + repeatedTextBuilder_.setMessage(builderForValue.build()); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder mergeRepeatedText( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + value) { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8 + && transformationDetail_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + .getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetail_ = value; + } + onChanged(); + } else { + if (transformationDetailCase_ == 8) { + repeatedTextBuilder_.mergeFrom(value); + } + repeatedTextBuilder_.setMessage(value); + } + transformationDetailCase_ = 8; + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder clearRepeatedText() { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + onChanged(); + } + } else { + if (transformationDetailCase_ == 8) { + transformationDetailCase_ = 0; + transformationDetail_ = null; + } + repeatedTextBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder + getRepeatedTextBuilder() { + return getRepeatedTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if ((transformationDetailCase_ == 8) && (repeatedTextBuilder_ != null)) { + return repeatedTextBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder> + getRepeatedTextFieldBuilder() { + if (repeatedTextBuilder_ == null) { + if (!(transformationDetailCase_ == 8)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + repeatedTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_, + getParentForChildren(), + isClean()); + transformationDetail_ = null; + } + transformationDetailCase_ = 8; + onChanged(); + ; + return repeatedTextBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transformation(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int additionalOptimizationObjectiveConfigCase_ = 0; + private java.lang.Object additionalOptimizationObjectiveConfig_; + + public enum AdditionalOptimizationObjectiveConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPTIMIZATION_OBJECTIVE_RECALL_VALUE(5), + OPTIMIZATION_OBJECTIVE_PRECISION_VALUE(6), + ADDITIONALOPTIMIZATIONOBJECTIVECONFIG_NOT_SET(0); + private final int value; + + private AdditionalOptimizationObjectiveConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AdditionalOptimizationObjectiveConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AdditionalOptimizationObjectiveConfigCase forNumber(int value) { + switch (value) { + case 5: + return OPTIMIZATION_OBJECTIVE_RECALL_VALUE; + case 6: + return OPTIMIZATION_OBJECTIVE_PRECISION_VALUE; + case 0: + return ADDITIONALOPTIMIZATIONOBJECTIVECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AdditionalOptimizationObjectiveConfigCase getAdditionalOptimizationObjectiveConfigCase() { + return AdditionalOptimizationObjectiveConfigCase.forNumber( + additionalOptimizationObjectiveConfigCase_); + } + + public static final int OPTIMIZATION_OBJECTIVE_RECALL_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Required when optimization_objective is "maximize-precision-at-recall".
+   * Must be between 0 and 1, inclusive.
+   * 
+ * + * float optimization_objective_recall_value = 5; + * + * @return The optimizationObjectiveRecallValue. + */ + @java.lang.Override + public float getOptimizationObjectiveRecallValue() { + if (additionalOptimizationObjectiveConfigCase_ == 5) { + return (java.lang.Float) additionalOptimizationObjectiveConfig_; + } + return 0F; + } + + public static final int OPTIMIZATION_OBJECTIVE_PRECISION_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Required when optimization_objective is "maximize-recall-at-precision".
+   * Must be between 0 and 1, inclusive.
+   * 
+ * + * float optimization_objective_precision_value = 6; + * + * @return The optimizationObjectivePrecisionValue. + */ + @java.lang.Override + public float getOptimizationObjectivePrecisionValue() { + if (additionalOptimizationObjectiveConfigCase_ == 6) { + return (java.lang.Float) additionalOptimizationObjectiveConfig_; + } + return 0F; + } + + public static final int PREDICTION_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object predictionType_; + /** + * + * + *
+   * The type of prediction the Model is to produce.
+   *   "classification" - Predict one out of multiple target values is
+   *                      picked for each row.
+   *   "regression" - Predict a value based on its relation to other values.
+   *                  This type is available only to columns that contain
+   *                  semantically numeric values, i.e. integers or floating
+   *                  point number, even if stored as e.g. strings.
+   * 
+ * + * string prediction_type = 1; + * + * @return The predictionType. + */ + @java.lang.Override + public java.lang.String getPredictionType() { + java.lang.Object ref = predictionType_; + 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(); + predictionType_ = s; + return s; + } + } + /** + * + * + *
+   * The type of prediction the Model is to produce.
+   *   "classification" - Predict one out of multiple target values is
+   *                      picked for each row.
+   *   "regression" - Predict a value based on its relation to other values.
+   *                  This type is available only to columns that contain
+   *                  semantically numeric values, i.e. integers or floating
+   *                  point number, even if stored as e.g. strings.
+   * 
+ * + * string prediction_type = 1; + * + * @return The bytes for predictionType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPredictionTypeBytes() { + java.lang.Object ref = predictionType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_COLUMN_FIELD_NUMBER = 2; + private volatile java.lang.Object targetColumn_; + /** + * + * + *
+   * The column name of the target column that the model is to predict.
+   * 
+ * + * string target_column = 2; + * + * @return The targetColumn. + */ + @java.lang.Override + public java.lang.String getTargetColumn() { + java.lang.Object ref = targetColumn_; + 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(); + targetColumn_ = s; + return s; + } + } + /** + * + * + *
+   * The column name of the target column that the model is to predict.
+   * 
+ * + * string target_column = 2; + * + * @return The bytes for targetColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetColumnBytes() { + java.lang.Object ref = targetColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFORMATIONS_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation> + transformations_; + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation> + getTransformationsList() { + return transformations_; + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + getTransformationsOrBuilderList() { + return transformations_; + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public int getTransformationsCount() { + return transformations_.size(); + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getTransformations(int index) { + return transformations_.get(index); + } + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index) { + return transformations_.get(index); + } + + public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 4; + private volatile java.lang.Object optimizationObjective_; + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that maximizes/minimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives depend on the prediction type.
+   * If the field is not set, a default objective function is used.
+   * classification (binary):
+   *   "maximize-au-roc" (default) - Maximize the area under the receiver
+   *                                 operating characteristic (ROC) curve.
+   *   "minimize-log-loss" - Minimize log loss.
+   *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+   *   "maximize-precision-at-recall" - Maximize precision for a specified
+   *                                   recall value.
+   *   "maximize-recall-at-precision" - Maximize recall for a specified
+   *                                    precision value.
+   * classification (multi-class):
+   *   "minimize-log-loss" (default) - Minimize log loss.
+   * regression:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   * 
+ * + * string optimization_objective = 4; + * + * @return The optimizationObjective. + */ + @java.lang.Override + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + 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(); + optimizationObjective_ = s; + return s; + } + } + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that maximizes/minimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives depend on the prediction type.
+   * If the field is not set, a default objective function is used.
+   * classification (binary):
+   *   "maximize-au-roc" (default) - Maximize the area under the receiver
+   *                                 operating characteristic (ROC) curve.
+   *   "minimize-log-loss" - Minimize log loss.
+   *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+   *   "maximize-precision-at-recall" - Maximize precision for a specified
+   *                                   recall value.
+   *   "maximize-recall-at-precision" - Maximize recall for a specified
+   *                                    precision value.
+   * classification (multi-class):
+   *   "minimize-log-loss" (default) - Minimize log loss.
+   * regression:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   * 
+ * + * string optimization_objective = 4; + * + * @return The bytes for optimizationObjective. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 7; + private long trainBudgetMilliNodeHours_; + /** + * + * + *
+   * Required. The train budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour.
+   * The training cost of the model will not exceed this budget. The final cost
+   * will be attempted to be close to the budget, though may end up being (even)
+   * noticeably smaller - at the backend's discretion. This especially may
+   * happen when further model training ceases to provide any improvements.
+   * If the budget is set to a value known to be insufficient to train a
+   * model for the given dataset, the training won't be attempted and
+   * will error.
+   * The train budget must be between 1,000 and 72,000 milli node hours,
+   * inclusive.
+   * 
+ * + * int64 train_budget_milli_node_hours = 7; + * + * @return The trainBudgetMilliNodeHours. + */ + @java.lang.Override + public long getTrainBudgetMilliNodeHours() { + return trainBudgetMilliNodeHours_; + } + + public static final int DISABLE_EARLY_STOPPING_FIELD_NUMBER = 8; + private boolean disableEarlyStopping_; + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * By default, the early stopping feature is enabled, which means that AutoML
+   * Tables might stop training before the entire training budget has been used.
+   * 
+ * + * bool disable_early_stopping = 8; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + + public static final int WEIGHT_COLUMN_NAME_FIELD_NUMBER = 9; + private volatile java.lang.Object weightColumnName_; + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column_name = 9; + * + * @return The weightColumnName. + */ + @java.lang.Override + public java.lang.String getWeightColumnName() { + java.lang.Object ref = weightColumnName_; + 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(); + weightColumnName_ = s; + return s; + } + } + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column_name = 9; + * + * @return The bytes for weightColumnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWeightColumnNameBytes() { + java.lang.Object ref = weightColumnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + weightColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPORT_EVALUATED_DATA_ITEMS_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + exportEvaluatedDataItemsConfig_; + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + @java.lang.Override + public boolean hasExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfig_ != null; + } + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder() { + return getExportEvaluatedDataItemsConfig(); + } + + 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 (!getPredictionTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, predictionType_); + } + if (!getTargetColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetColumn_); + } + for (int i = 0; i < transformations_.size(); i++) { + output.writeMessage(3, transformations_.get(i)); + } + if (!getOptimizationObjectiveBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optimizationObjective_); + } + if (additionalOptimizationObjectiveConfigCase_ == 5) { + output.writeFloat(5, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); + } + if (additionalOptimizationObjectiveConfigCase_ == 6) { + output.writeFloat(6, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); + } + if (trainBudgetMilliNodeHours_ != 0L) { + output.writeInt64(7, trainBudgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + output.writeBool(8, disableEarlyStopping_); + } + if (!getWeightColumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, weightColumnName_); + } + if (exportEvaluatedDataItemsConfig_ != null) { + output.writeMessage(10, getExportEvaluatedDataItemsConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPredictionTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, predictionType_); + } + if (!getTargetColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetColumn_); + } + for (int i = 0; i < transformations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, transformations_.get(i)); + } + if (!getOptimizationObjectiveBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optimizationObjective_); + } + if (additionalOptimizationObjectiveConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 5, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); + } + if (additionalOptimizationObjectiveConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 6, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); + } + if (trainBudgetMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, trainBudgetMilliNodeHours_); + } + if (disableEarlyStopping_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, disableEarlyStopping_); + } + if (!getWeightColumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, weightColumnName_); + } + if (exportEvaluatedDataItemsConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getExportEvaluatedDataItemsConfig()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) obj; + + if (!getPredictionType().equals(other.getPredictionType())) return false; + if (!getTargetColumn().equals(other.getTargetColumn())) return false; + if (!getTransformationsList().equals(other.getTransformationsList())) return false; + if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; + if (getTrainBudgetMilliNodeHours() != other.getTrainBudgetMilliNodeHours()) return false; + if (getDisableEarlyStopping() != other.getDisableEarlyStopping()) return false; + if (!getWeightColumnName().equals(other.getWeightColumnName())) return false; + if (hasExportEvaluatedDataItemsConfig() != other.hasExportEvaluatedDataItemsConfig()) + return false; + if (hasExportEvaluatedDataItemsConfig()) { + if (!getExportEvaluatedDataItemsConfig().equals(other.getExportEvaluatedDataItemsConfig())) + return false; + } + if (!getAdditionalOptimizationObjectiveConfigCase() + .equals(other.getAdditionalOptimizationObjectiveConfigCase())) return false; + switch (additionalOptimizationObjectiveConfigCase_) { + case 5: + if (java.lang.Float.floatToIntBits(getOptimizationObjectiveRecallValue()) + != java.lang.Float.floatToIntBits(other.getOptimizationObjectiveRecallValue())) + return false; + break; + case 6: + if (java.lang.Float.floatToIntBits(getOptimizationObjectivePrecisionValue()) + != java.lang.Float.floatToIntBits(other.getOptimizationObjectivePrecisionValue())) + 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) + PREDICTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPredictionType().hashCode(); + hash = (37 * hash) + TARGET_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getTargetColumn().hashCode(); + if (getTransformationsCount() > 0) { + hash = (37 * hash) + TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransformationsList().hashCode(); + } + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjective().hashCode(); + hash = (37 * hash) + TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainBudgetMilliNodeHours()); + hash = (37 * hash) + DISABLE_EARLY_STOPPING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableEarlyStopping()); + hash = (37 * hash) + WEIGHT_COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWeightColumnName().hashCode(); + if (hasExportEvaluatedDataItemsConfig()) { + hash = (37 * hash) + EXPORT_EVALUATED_DATA_ITEMS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExportEvaluatedDataItemsConfig().hashCode(); + } + switch (additionalOptimizationObjectiveConfigCase_) { + case 5: + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_RECALL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getOptimizationObjectiveRecallValue()); + break; + case 6: + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_PRECISION_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + java.lang.Float.floatToIntBits(getOptimizationObjectivePrecisionValue()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransformationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + predictionType_ = ""; + + targetColumn_ = ""; + + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformationsBuilder_.clear(); + } + optimizationObjective_ = ""; + + trainBudgetMilliNodeHours_ = 0L; + + disableEarlyStopping_ = false; + + weightColumnName_ = ""; + + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = null; + } else { + exportEvaluatedDataItemsConfig_ = null; + exportEvaluatedDataItemsConfigBuilder_ = null; + } + additionalOptimizationObjectiveConfigCase_ = 0; + additionalOptimizationObjectiveConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs( + this); + int from_bitField0_ = bitField0_; + if (additionalOptimizationObjectiveConfigCase_ == 5) { + result.additionalOptimizationObjectiveConfig_ = additionalOptimizationObjectiveConfig_; + } + if (additionalOptimizationObjectiveConfigCase_ == 6) { + result.additionalOptimizationObjectiveConfig_ = additionalOptimizationObjectiveConfig_; + } + result.predictionType_ = predictionType_; + result.targetColumn_ = targetColumn_; + if (transformationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transformations_ = transformations_; + } else { + result.transformations_ = transformationsBuilder_.build(); + } + result.optimizationObjective_ = optimizationObjective_; + result.trainBudgetMilliNodeHours_ = trainBudgetMilliNodeHours_; + result.disableEarlyStopping_ = disableEarlyStopping_; + result.weightColumnName_ = weightColumnName_; + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + result.exportEvaluatedDataItemsConfig_ = exportEvaluatedDataItemsConfig_; + } else { + result.exportEvaluatedDataItemsConfig_ = exportEvaluatedDataItemsConfigBuilder_.build(); + } + result.additionalOptimizationObjectiveConfigCase_ = + additionalOptimizationObjectiveConfigCase_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance()) return this; + if (!other.getPredictionType().isEmpty()) { + predictionType_ = other.predictionType_; + onChanged(); + } + if (!other.getTargetColumn().isEmpty()) { + targetColumn_ = other.targetColumn_; + onChanged(); + } + if (transformationsBuilder_ == null) { + if (!other.transformations_.isEmpty()) { + if (transformations_.isEmpty()) { + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformationsIsMutable(); + transformations_.addAll(other.transformations_); + } + onChanged(); + } + } else { + if (!other.transformations_.isEmpty()) { + if (transformationsBuilder_.isEmpty()) { + transformationsBuilder_.dispose(); + transformationsBuilder_ = null; + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + transformationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransformationsFieldBuilder() + : null; + } else { + transformationsBuilder_.addAllMessages(other.transformations_); + } + } + } + if (!other.getOptimizationObjective().isEmpty()) { + optimizationObjective_ = other.optimizationObjective_; + onChanged(); + } + if (other.getTrainBudgetMilliNodeHours() != 0L) { + setTrainBudgetMilliNodeHours(other.getTrainBudgetMilliNodeHours()); + } + if (other.getDisableEarlyStopping() != false) { + setDisableEarlyStopping(other.getDisableEarlyStopping()); + } + if (!other.getWeightColumnName().isEmpty()) { + weightColumnName_ = other.weightColumnName_; + onChanged(); + } + if (other.hasExportEvaluatedDataItemsConfig()) { + mergeExportEvaluatedDataItemsConfig(other.getExportEvaluatedDataItemsConfig()); + } + switch (other.getAdditionalOptimizationObjectiveConfigCase()) { + case OPTIMIZATION_OBJECTIVE_RECALL_VALUE: + { + setOptimizationObjectiveRecallValue(other.getOptimizationObjectiveRecallValue()); + break; + } + case OPTIMIZATION_OBJECTIVE_PRECISION_VALUE: + { + setOptimizationObjectivePrecisionValue(other.getOptimizationObjectivePrecisionValue()); + break; + } + case ADDITIONALOPTIMIZATIONOBJECTIVECONFIG_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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int additionalOptimizationObjectiveConfigCase_ = 0; + private java.lang.Object additionalOptimizationObjectiveConfig_; + + public AdditionalOptimizationObjectiveConfigCase + getAdditionalOptimizationObjectiveConfigCase() { + return AdditionalOptimizationObjectiveConfigCase.forNumber( + additionalOptimizationObjectiveConfigCase_); + } + + public Builder clearAdditionalOptimizationObjectiveConfig() { + additionalOptimizationObjectiveConfigCase_ = 0; + additionalOptimizationObjectiveConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Required when optimization_objective is "maximize-precision-at-recall".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_recall_value = 5; + * + * @return The optimizationObjectiveRecallValue. + */ + public float getOptimizationObjectiveRecallValue() { + if (additionalOptimizationObjectiveConfigCase_ == 5) { + return (java.lang.Float) additionalOptimizationObjectiveConfig_; + } + return 0F; + } + /** + * + * + *
+     * Required when optimization_objective is "maximize-precision-at-recall".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_recall_value = 5; + * + * @param value The optimizationObjectiveRecallValue to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveRecallValue(float value) { + additionalOptimizationObjectiveConfigCase_ = 5; + additionalOptimizationObjectiveConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required when optimization_objective is "maximize-precision-at-recall".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_recall_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjectiveRecallValue() { + if (additionalOptimizationObjectiveConfigCase_ == 5) { + additionalOptimizationObjectiveConfigCase_ = 0; + additionalOptimizationObjectiveConfig_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required when optimization_objective is "maximize-recall-at-precision".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_precision_value = 6; + * + * @return The optimizationObjectivePrecisionValue. + */ + public float getOptimizationObjectivePrecisionValue() { + if (additionalOptimizationObjectiveConfigCase_ == 6) { + return (java.lang.Float) additionalOptimizationObjectiveConfig_; + } + return 0F; + } + /** + * + * + *
+     * Required when optimization_objective is "maximize-recall-at-precision".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_precision_value = 6; + * + * @param value The optimizationObjectivePrecisionValue to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectivePrecisionValue(float value) { + additionalOptimizationObjectiveConfigCase_ = 6; + additionalOptimizationObjectiveConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required when optimization_objective is "maximize-recall-at-precision".
+     * Must be between 0 and 1, inclusive.
+     * 
+ * + * float optimization_objective_precision_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjectivePrecisionValue() { + if (additionalOptimizationObjectiveConfigCase_ == 6) { + additionalOptimizationObjectiveConfigCase_ = 0; + additionalOptimizationObjectiveConfig_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object predictionType_ = ""; + /** + * + * + *
+     * The type of prediction the Model is to produce.
+     *   "classification" - Predict one out of multiple target values is
+     *                      picked for each row.
+     *   "regression" - Predict a value based on its relation to other values.
+     *                  This type is available only to columns that contain
+     *                  semantically numeric values, i.e. integers or floating
+     *                  point number, even if stored as e.g. strings.
+     * 
+ * + * string prediction_type = 1; + * + * @return The predictionType. + */ + public java.lang.String getPredictionType() { + java.lang.Object ref = predictionType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predictionType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of prediction the Model is to produce.
+     *   "classification" - Predict one out of multiple target values is
+     *                      picked for each row.
+     *   "regression" - Predict a value based on its relation to other values.
+     *                  This type is available only to columns that contain
+     *                  semantically numeric values, i.e. integers or floating
+     *                  point number, even if stored as e.g. strings.
+     * 
+ * + * string prediction_type = 1; + * + * @return The bytes for predictionType. + */ + public com.google.protobuf.ByteString getPredictionTypeBytes() { + java.lang.Object ref = predictionType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of prediction the Model is to produce.
+     *   "classification" - Predict one out of multiple target values is
+     *                      picked for each row.
+     *   "regression" - Predict a value based on its relation to other values.
+     *                  This type is available only to columns that contain
+     *                  semantically numeric values, i.e. integers or floating
+     *                  point number, even if stored as e.g. strings.
+     * 
+ * + * string prediction_type = 1; + * + * @param value The predictionType to set. + * @return This builder for chaining. + */ + public Builder setPredictionType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + predictionType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of prediction the Model is to produce.
+     *   "classification" - Predict one out of multiple target values is
+     *                      picked for each row.
+     *   "regression" - Predict a value based on its relation to other values.
+     *                  This type is available only to columns that contain
+     *                  semantically numeric values, i.e. integers or floating
+     *                  point number, even if stored as e.g. strings.
+     * 
+ * + * string prediction_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearPredictionType() { + + predictionType_ = getDefaultInstance().getPredictionType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of prediction the Model is to produce.
+     *   "classification" - Predict one out of multiple target values is
+     *                      picked for each row.
+     *   "regression" - Predict a value based on its relation to other values.
+     *                  This type is available only to columns that contain
+     *                  semantically numeric values, i.e. integers or floating
+     *                  point number, even if stored as e.g. strings.
+     * 
+ * + * string prediction_type = 1; + * + * @param value The bytes for predictionType to set. + * @return This builder for chaining. + */ + public Builder setPredictionTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + predictionType_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetColumn_ = ""; + /** + * + * + *
+     * The column name of the target column that the model is to predict.
+     * 
+ * + * string target_column = 2; + * + * @return The targetColumn. + */ + public java.lang.String getTargetColumn() { + java.lang.Object ref = targetColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The column name of the target column that the model is to predict.
+     * 
+ * + * string target_column = 2; + * + * @return The bytes for targetColumn. + */ + public com.google.protobuf.ByteString getTargetColumnBytes() { + java.lang.Object ref = targetColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The column name of the target column that the model is to predict.
+     * 
+ * + * string target_column = 2; + * + * @param value The targetColumn to set. + * @return This builder for chaining. + */ + public Builder setTargetColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetColumn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The column name of the target column that the model is to predict.
+     * 
+ * + * string target_column = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetColumn() { + + targetColumn_ = getDefaultInstance().getTargetColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * The column name of the target column that the model is to predict.
+     * 
+ * + * string target_column = 2; + * + * @param value The bytes for targetColumn to set. + * @return This builder for chaining. + */ + public Builder setTargetColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetColumn_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation> + transformations_ = java.util.Collections.emptyList(); + + private void ensureTransformationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transformations_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation>(transformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + transformationsBuilder_; + + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation> + getTransformationsList() { + if (transformationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transformations_); + } else { + return transformationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public int getTransformationsCount() { + if (transformationsBuilder_ == null) { + return transformations_.size(); + } else { + return transformationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getTransformations(int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); + } else { + return transformationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.set(index, value); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.set(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(value); + onChanged(); + } else { + transformationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(index, value); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addAllTransformations( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation> + values) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transformations_); + onChanged(); + } else { + transformationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder clearTransformations() { + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder removeTransformations(int index) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.remove(index); + onChanged(); + } else { + transformationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + getTransformationsBuilder(int index) { + return getTransformationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); + } else { + return transformationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + getTransformationsOrBuilderList() { + if (transformationsBuilder_ != null) { + return transformationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transformations_); + } + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + addTransformationsBuilder() { + return getTransformationsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.getDefaultInstance()); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + addTransformationsBuilder(int index) { + return getTransformationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.getDefaultInstance()); + } + /** + * + * + *
+     * Each transformation will apply transform function to given input column.
+     * And the result will be used for training.
+     * When creating transformation for BigQuery Struct column, the column should
+     * be flattened using "." as the delimiter.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder> + getTransformationsBuilderList() { + return getTransformationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + getTransformationsFieldBuilder() { + if (transformationsBuilder_ == null) { + transformationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder>( + transformations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transformations_ = null; + } + return transformationsBuilder_; + } + + private java.lang.Object optimizationObjective_ = ""; + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that maximizes/minimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives depend on the prediction type.
+     * If the field is not set, a default objective function is used.
+     * classification (binary):
+     *   "maximize-au-roc" (default) - Maximize the area under the receiver
+     *                                 operating characteristic (ROC) curve.
+     *   "minimize-log-loss" - Minimize log loss.
+     *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+     *   "maximize-precision-at-recall" - Maximize precision for a specified
+     *                                   recall value.
+     *   "maximize-recall-at-precision" - Maximize recall for a specified
+     *                                    precision value.
+     * classification (multi-class):
+     *   "minimize-log-loss" (default) - Minimize log loss.
+     * regression:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     * 
+ * + * string optimization_objective = 4; + * + * @return The optimizationObjective. + */ + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that maximizes/minimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives depend on the prediction type.
+     * If the field is not set, a default objective function is used.
+     * classification (binary):
+     *   "maximize-au-roc" (default) - Maximize the area under the receiver
+     *                                 operating characteristic (ROC) curve.
+     *   "minimize-log-loss" - Minimize log loss.
+     *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+     *   "maximize-precision-at-recall" - Maximize precision for a specified
+     *                                   recall value.
+     *   "maximize-recall-at-precision" - Maximize recall for a specified
+     *                                    precision value.
+     * classification (multi-class):
+     *   "minimize-log-loss" (default) - Minimize log loss.
+     * regression:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     * 
+ * + * string optimization_objective = 4; + * + * @return The bytes for optimizationObjective. + */ + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that maximizes/minimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives depend on the prediction type.
+     * If the field is not set, a default objective function is used.
+     * classification (binary):
+     *   "maximize-au-roc" (default) - Maximize the area under the receiver
+     *                                 operating characteristic (ROC) curve.
+     *   "minimize-log-loss" - Minimize log loss.
+     *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+     *   "maximize-precision-at-recall" - Maximize precision for a specified
+     *                                   recall value.
+     *   "maximize-recall-at-precision" - Maximize recall for a specified
+     *                                    precision value.
+     * classification (multi-class):
+     *   "minimize-log-loss" (default) - Minimize log loss.
+     * regression:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     * 
+ * + * string optimization_objective = 4; + * + * @param value The optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjective(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + optimizationObjective_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that maximizes/minimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives depend on the prediction type.
+     * If the field is not set, a default objective function is used.
+     * classification (binary):
+     *   "maximize-au-roc" (default) - Maximize the area under the receiver
+     *                                 operating characteristic (ROC) curve.
+     *   "minimize-log-loss" - Minimize log loss.
+     *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+     *   "maximize-precision-at-recall" - Maximize precision for a specified
+     *                                   recall value.
+     *   "maximize-recall-at-precision" - Maximize recall for a specified
+     *                                    precision value.
+     * classification (multi-class):
+     *   "minimize-log-loss" (default) - Minimize log loss.
+     * regression:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     * 
+ * + * string optimization_objective = 4; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjective() { + + optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); + onChanged(); + return this; + } + /** + * + * + *
+     * Objective function the model is optimizing towards. The training process
+     * creates a model that maximizes/minimizes the value of the objective
+     * function over the validation set.
+     * The supported optimization objectives depend on the prediction type.
+     * If the field is not set, a default objective function is used.
+     * classification (binary):
+     *   "maximize-au-roc" (default) - Maximize the area under the receiver
+     *                                 operating characteristic (ROC) curve.
+     *   "minimize-log-loss" - Minimize log loss.
+     *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+     *   "maximize-precision-at-recall" - Maximize precision for a specified
+     *                                   recall value.
+     *   "maximize-recall-at-precision" - Maximize recall for a specified
+     *                                    precision value.
+     * classification (multi-class):
+     *   "minimize-log-loss" (default) - Minimize log loss.
+     * regression:
+     *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+     *   "minimize-mae" - Minimize mean-absolute error (MAE).
+     *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+     * 
+ * + * string optimization_objective = 4; + * + * @param value The bytes for optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + optimizationObjective_ = value; + onChanged(); + return this; + } + + private long trainBudgetMilliNodeHours_; + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 7; + * + * @return The trainBudgetMilliNodeHours. + */ + @java.lang.Override + public long getTrainBudgetMilliNodeHours() { + return trainBudgetMilliNodeHours_; + } + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 7; + * + * @param value The trainBudgetMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setTrainBudgetMilliNodeHours(long value) { + + trainBudgetMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The train budget of creating this model, expressed in milli node
+     * hours i.e. 1,000 value in this field means 1 node hour.
+     * The training cost of the model will not exceed this budget. The final cost
+     * will be attempted to be close to the budget, though may end up being (even)
+     * noticeably smaller - at the backend's discretion. This especially may
+     * happen when further model training ceases to provide any improvements.
+     * If the budget is set to a value known to be insufficient to train a
+     * model for the given dataset, the training won't be attempted and
+     * will error.
+     * The train budget must be between 1,000 and 72,000 milli node hours,
+     * inclusive.
+     * 
+ * + * int64 train_budget_milli_node_hours = 7; + * + * @return This builder for chaining. + */ + public Builder clearTrainBudgetMilliNodeHours() { + + trainBudgetMilliNodeHours_ = 0L; + onChanged(); + return this; + } + + private boolean disableEarlyStopping_; + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * By default, the early stopping feature is enabled, which means that AutoML
+     * Tables might stop training before the entire training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 8; + * + * @return The disableEarlyStopping. + */ + @java.lang.Override + public boolean getDisableEarlyStopping() { + return disableEarlyStopping_; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * By default, the early stopping feature is enabled, which means that AutoML
+     * Tables might stop training before the entire training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 8; + * + * @param value The disableEarlyStopping to set. + * @return This builder for chaining. + */ + public Builder setDisableEarlyStopping(boolean value) { + + disableEarlyStopping_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use the entire training budget. This disables the early stopping feature.
+     * By default, the early stopping feature is enabled, which means that AutoML
+     * Tables might stop training before the entire training budget has been used.
+     * 
+ * + * bool disable_early_stopping = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisableEarlyStopping() { + + disableEarlyStopping_ = false; + onChanged(); + return this; + } + + private java.lang.Object weightColumnName_ = ""; + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column_name = 9; + * + * @return The weightColumnName. + */ + public java.lang.String getWeightColumnName() { + java.lang.Object ref = weightColumnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + weightColumnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column_name = 9; + * + * @return The bytes for weightColumnName. + */ + public com.google.protobuf.ByteString getWeightColumnNameBytes() { + java.lang.Object ref = weightColumnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + weightColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column_name = 9; + * + * @param value The weightColumnName to set. + * @return This builder for chaining. + */ + public Builder setWeightColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + weightColumnName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column_name = 9; + * + * @return This builder for chaining. + */ + public Builder clearWeightColumnName() { + + weightColumnName_ = getDefaultInstance().getWeightColumnName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Column name that should be used as the weight column.
+     * Higher values in this column give more importance to the row
+     * during model training. The column must have numeric values between 0 and
+     * 10000 inclusively; 0 means the row is ignored for training. If weight
+     * column field is not set, then all rows are assumed to have equal weight
+     * of 1.
+     * 
+ * + * string weight_column_name = 9; + * + * @param value The bytes for weightColumnName to set. + * @return This builder for chaining. + */ + public Builder setWeightColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + weightColumnName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + exportEvaluatedDataItemsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder> + exportEvaluatedDataItemsConfigBuilder_; + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + public boolean hasExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfigBuilder_ != null + || exportEvaluatedDataItemsConfig_ != null; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } else { + return exportEvaluatedDataItemsConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + value) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exportEvaluatedDataItemsConfig_ = value; + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + builderForValue) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = builderForValue.build(); + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder mergeExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + value) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + if (exportEvaluatedDataItemsConfig_ != null) { + exportEvaluatedDataItemsConfig_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.newBuilder(exportEvaluatedDataItemsConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + exportEvaluatedDataItemsConfig_ = value; + } + onChanged(); + } else { + exportEvaluatedDataItemsConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder clearExportEvaluatedDataItemsConfig() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfig_ = null; + onChanged(); + } else { + exportEvaluatedDataItemsConfig_ = null; + exportEvaluatedDataItemsConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + getExportEvaluatedDataItemsConfigBuilder() { + + onChanged(); + return getExportEvaluatedDataItemsConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ != null) { + return exportEvaluatedDataItemsConfigBuilder_.getMessageOrBuilder(); + } else { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance() + : exportEvaluatedDataItemsConfig_; + } + } + /** + * + * + *
+     * Configuration for exporting test set predictions to a BigQuery table. If
+     * this configuration is absent, then the export is not performed.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder> + getExportEvaluatedDataItemsConfigFieldBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder>( + getExportEvaluatedDataItemsConfig(), getParentForChildren(), isClean()); + exportEvaluatedDataItemsConfig_ = null; + } + return exportEvaluatedDataItemsConfigBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTablesInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTablesInputs(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java new file mode 100644 index 000000000..d8d20ed05 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java @@ -0,0 +1,389 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTablesInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required when optimization_objective is "maximize-precision-at-recall".
+   * Must be between 0 and 1, inclusive.
+   * 
+ * + * float optimization_objective_recall_value = 5; + * + * @return The optimizationObjectiveRecallValue. + */ + float getOptimizationObjectiveRecallValue(); + + /** + * + * + *
+   * Required when optimization_objective is "maximize-recall-at-precision".
+   * Must be between 0 and 1, inclusive.
+   * 
+ * + * float optimization_objective_precision_value = 6; + * + * @return The optimizationObjectivePrecisionValue. + */ + float getOptimizationObjectivePrecisionValue(); + + /** + * + * + *
+   * The type of prediction the Model is to produce.
+   *   "classification" - Predict one out of multiple target values is
+   *                      picked for each row.
+   *   "regression" - Predict a value based on its relation to other values.
+   *                  This type is available only to columns that contain
+   *                  semantically numeric values, i.e. integers or floating
+   *                  point number, even if stored as e.g. strings.
+   * 
+ * + * string prediction_type = 1; + * + * @return The predictionType. + */ + java.lang.String getPredictionType(); + /** + * + * + *
+   * The type of prediction the Model is to produce.
+   *   "classification" - Predict one out of multiple target values is
+   *                      picked for each row.
+   *   "regression" - Predict a value based on its relation to other values.
+   *                  This type is available only to columns that contain
+   *                  semantically numeric values, i.e. integers or floating
+   *                  point number, even if stored as e.g. strings.
+   * 
+ * + * string prediction_type = 1; + * + * @return The bytes for predictionType. + */ + com.google.protobuf.ByteString getPredictionTypeBytes(); + + /** + * + * + *
+   * The column name of the target column that the model is to predict.
+   * 
+ * + * string target_column = 2; + * + * @return The targetColumn. + */ + java.lang.String getTargetColumn(); + /** + * + * + *
+   * The column name of the target column that the model is to predict.
+   * 
+ * + * string target_column = 2; + * + * @return The bytes for targetColumn. + */ + com.google.protobuf.ByteString getTargetColumnBytes(); + + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation> + getTransformationsList(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getTransformations(int index); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + int getTransformationsCount(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + getTransformationsOrBuilderList(); + /** + * + * + *
+   * Each transformation will apply transform function to given input column.
+   * And the result will be used for training.
+   * When creating transformation for BigQuery Struct column, the column should
+   * be flattened using "." as the delimiter.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder + getTransformationsOrBuilder(int index); + + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that maximizes/minimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives depend on the prediction type.
+   * If the field is not set, a default objective function is used.
+   * classification (binary):
+   *   "maximize-au-roc" (default) - Maximize the area under the receiver
+   *                                 operating characteristic (ROC) curve.
+   *   "minimize-log-loss" - Minimize log loss.
+   *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+   *   "maximize-precision-at-recall" - Maximize precision for a specified
+   *                                   recall value.
+   *   "maximize-recall-at-precision" - Maximize recall for a specified
+   *                                    precision value.
+   * classification (multi-class):
+   *   "minimize-log-loss" (default) - Minimize log loss.
+   * regression:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   * 
+ * + * string optimization_objective = 4; + * + * @return The optimizationObjective. + */ + java.lang.String getOptimizationObjective(); + /** + * + * + *
+   * Objective function the model is optimizing towards. The training process
+   * creates a model that maximizes/minimizes the value of the objective
+   * function over the validation set.
+   * The supported optimization objectives depend on the prediction type.
+   * If the field is not set, a default objective function is used.
+   * classification (binary):
+   *   "maximize-au-roc" (default) - Maximize the area under the receiver
+   *                                 operating characteristic (ROC) curve.
+   *   "minimize-log-loss" - Minimize log loss.
+   *   "maximize-au-prc" - Maximize the area under the precision-recall curve.
+   *   "maximize-precision-at-recall" - Maximize precision for a specified
+   *                                   recall value.
+   *   "maximize-recall-at-precision" - Maximize recall for a specified
+   *                                    precision value.
+   * classification (multi-class):
+   *   "minimize-log-loss" (default) - Minimize log loss.
+   * regression:
+   *   "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE).
+   *   "minimize-mae" - Minimize mean-absolute error (MAE).
+   *   "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
+   * 
+ * + * string optimization_objective = 4; + * + * @return The bytes for optimizationObjective. + */ + com.google.protobuf.ByteString getOptimizationObjectiveBytes(); + + /** + * + * + *
+   * Required. The train budget of creating this model, expressed in milli node
+   * hours i.e. 1,000 value in this field means 1 node hour.
+   * The training cost of the model will not exceed this budget. The final cost
+   * will be attempted to be close to the budget, though may end up being (even)
+   * noticeably smaller - at the backend's discretion. This especially may
+   * happen when further model training ceases to provide any improvements.
+   * If the budget is set to a value known to be insufficient to train a
+   * model for the given dataset, the training won't be attempted and
+   * will error.
+   * The train budget must be between 1,000 and 72,000 milli node hours,
+   * inclusive.
+   * 
+ * + * int64 train_budget_milli_node_hours = 7; + * + * @return The trainBudgetMilliNodeHours. + */ + long getTrainBudgetMilliNodeHours(); + + /** + * + * + *
+   * Use the entire training budget. This disables the early stopping feature.
+   * By default, the early stopping feature is enabled, which means that AutoML
+   * Tables might stop training before the entire training budget has been used.
+   * 
+ * + * bool disable_early_stopping = 8; + * + * @return The disableEarlyStopping. + */ + boolean getDisableEarlyStopping(); + + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column_name = 9; + * + * @return The weightColumnName. + */ + java.lang.String getWeightColumnName(); + /** + * + * + *
+   * Column name that should be used as the weight column.
+   * Higher values in this column give more importance to the row
+   * during model training. The column must have numeric values between 0 and
+   * 10000 inclusively; 0 means the row is ignored for training. If weight
+   * column field is not set, then all rows are assumed to have equal weight
+   * of 1.
+   * 
+ * + * string weight_column_name = 9; + * + * @return The bytes for weightColumnName. + */ + com.google.protobuf.ByteString getWeightColumnNameBytes(); + + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return Whether the exportEvaluatedDataItemsConfig field is set. + */ + boolean hasExportEvaluatedDataItemsConfig(); + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig(); + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table. If
+   * this configuration is absent, then the export is not performed.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder(); + + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs + .AdditionalOptimizationObjectiveConfigCase + getAdditionalOptimizationObjectiveConfigCase(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadata.java new file mode 100644 index 000000000..e2d6b1551 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadata.java @@ -0,0 +1,608 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * Model metadata specific to AutoML Tables.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata} + */ +public final class AutoMlTablesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + AutoMlTablesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTablesMetadata.newBuilder() to construct. + private AutoMlTablesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTablesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTablesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTablesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + trainCostMilliNodeHours_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder.class); + } + + public static final int TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER = 1; + private long trainCostMilliNodeHours_; + /** + * + * + *
+   * Output only. The actual training cost of the model, expressed in milli
+   * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+   * to not exceed the train budget.
+   * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + @java.lang.Override + public long getTrainCostMilliNodeHours() { + return trainCostMilliNodeHours_; + } + + 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 (trainCostMilliNodeHours_ != 0L) { + output.writeInt64(1, trainCostMilliNodeHours_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainCostMilliNodeHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, trainCostMilliNodeHours_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + obj; + + if (getTrainCostMilliNodeHours() != other.getTrainCostMilliNodeHours()) 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) + TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainCostMilliNodeHours()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + 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 specific to AutoML Tables.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata.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(); + trainCostMilliNodeHours_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata(this); + result.trainCostMilliNodeHours_ = trainCostMilliNodeHours_; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance()) return this; + if (other.getTrainCostMilliNodeHours() != 0L) { + setTrainCostMilliNodeHours(other.getTrainCostMilliNodeHours()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long trainCostMilliNodeHours_; + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + @java.lang.Override + public long getTrainCostMilliNodeHours() { + return trainCostMilliNodeHours_; + } + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @param value The trainCostMilliNodeHours to set. + * @return This builder for chaining. + */ + public Builder setTrainCostMilliNodeHours(long value) { + + trainCostMilliNodeHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The actual training cost of the model, expressed in milli
+     * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+     * to not exceed the train budget.
+     * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrainCostMilliNodeHours() { + + trainCostMilliNodeHours_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTablesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTablesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTablesMetadata(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java new file mode 100644 index 000000000..5ba94debc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java @@ -0,0 +1,40 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTablesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The actual training cost of the model, expressed in milli
+   * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+   * to not exceed the train budget.
+   * 
+ * + * int64 train_cost_milli_node_hours = 1; + * + * @return The trainCostMilliNodeHours. + */ + long getTrainCostMilliNodeHours(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java new file mode 100644 index 000000000..0c0ba708e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTablesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassification.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassification.java new file mode 100644 index 000000000..4a0f8e5ad --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassification.java @@ -0,0 +1,866 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Classification Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification} + */ +public final class AutoMlTextClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification) + AutoMlTextClassificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextClassification.newBuilder() to construct. + private AutoMlTextClassification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextClassification() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextClassification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextClassification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + 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 TrainingJob that trains and uploads an AutoML Text Classification Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassification + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextClassification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextClassification(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java new file mode 100644 index 000000000..d8fa7ae68 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java @@ -0,0 +1,586 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs} + */ +public final class AutoMlTextClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + AutoMlTextClassificationInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextClassificationInputs.newBuilder() to construct. + private AutoMlTextClassificationInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextClassificationInputs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextClassificationInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextClassificationInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + multiLabel_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder.class); + } + + public static final int MULTI_LABEL_FIELD_NUMBER = 1; + private boolean multiLabel_; + /** + * bool multi_label = 1; + * + * @return The multiLabel. + */ + @java.lang.Override + public boolean getMultiLabel() { + return multiLabel_; + } + + 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 (multiLabel_ != false) { + output.writeBool(1, multiLabel_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (multiLabel_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, multiLabel_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) + obj; + + if (getMultiLabel() != other.getMultiLabel()) 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) + MULTI_LABEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMultiLabel()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs.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(); + multiLabel_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs(this); + result.multiLabel_ = multiLabel_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance()) return this; + if (other.getMultiLabel() != false) { + setMultiLabel(other.getMultiLabel()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean multiLabel_; + /** + * bool multi_label = 1; + * + * @return The multiLabel. + */ + @java.lang.Override + public boolean getMultiLabel() { + return multiLabel_; + } + /** + * bool multi_label = 1; + * + * @param value The multiLabel to set. + * @return This builder for chaining. + */ + public Builder setMultiLabel(boolean value) { + + multiLabel_ = value; + onChanged(); + return this; + } + /** + * bool multi_label = 1; + * + * @return This builder for chaining. + */ + public Builder clearMultiLabel() { + + multiLabel_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextClassificationInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextClassificationInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java new file mode 100644 index 000000000..70c5e2cdb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * bool multi_label = 1; + * + * @return The multiLabel. + */ + boolean getMultiLabel(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java new file mode 100644 index 000000000..85ed8d034 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtraction.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtraction.java new file mode 100644 index 000000000..1435600f9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtraction.java @@ -0,0 +1,855 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Extraction Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction} + */ +public final class AutoMlTextExtraction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + AutoMlTextExtractionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextExtraction.newBuilder() to construct. + private AutoMlTextExtraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextExtraction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextExtraction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextExtraction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + 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 TrainingJob that trains and uploads an AutoML Text Extraction Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + .getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtraction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextExtraction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextExtraction(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java new file mode 100644 index 000000000..da25e7925 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java @@ -0,0 +1,514 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs} + */ +public final class AutoMlTextExtractionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + AutoMlTextExtractionInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextExtractionInputs.newBuilder() to construct. + private AutoMlTextExtractionInputs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextExtractionInputs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextExtractionInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextExtractionInputs( + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs) + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs) + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextExtractionInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextExtractionInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java new file mode 100644 index 000000000..8a43ea004 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextExtractionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java new file mode 100644 index 000000000..aea6b7aec --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextExtractionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtraction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentiment.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentiment.java new file mode 100644 index 000000000..e88c04ddd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentiment.java @@ -0,0 +1,850 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Sentiment Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment} + */ +public final class AutoMlTextSentiment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + AutoMlTextSentimentOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextSentiment.newBuilder() to construct. + private AutoMlTextSentiment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextSentiment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextSentiment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextSentiment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + 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 TrainingJob that trains and uploads an AutoML Text Sentiment Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment( + this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + .getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentiment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextSentiment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextSentiment(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java new file mode 100644 index 000000000..e7a62d239 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java @@ -0,0 +1,626 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs} + */ +public final class AutoMlTextSentimentInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + AutoMlTextSentimentInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlTextSentimentInputs.newBuilder() to construct. + private AutoMlTextSentimentInputs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlTextSentimentInputs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlTextSentimentInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlTextSentimentInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sentimentMax_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder.class); + } + + public static final int SENTIMENT_MAX_FIELD_NUMBER = 1; + private int sentimentMax_; + /** + * + * + *
+   * A sentiment is expressed as an integer ordinal, where higher value
+   * means a more positive sentiment. The range of sentiments that will be used
+   * is between 0 and sentimentMax (inclusive on both ends), and all the values
+   * in the range must be represented in the dataset before a model can be
+   * created.
+   * Only the Annotations with this sentimentMax will be used for training.
+   * sentimentMax value must be between 1 and 10 (inclusive).
+   * 
+ * + * int32 sentiment_max = 1; + * + * @return The sentimentMax. + */ + @java.lang.Override + public int getSentimentMax() { + return sentimentMax_; + } + + 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 (sentimentMax_ != 0) { + output.writeInt32(1, sentimentMax_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sentimentMax_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sentimentMax_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs) + obj; + + if (getSentimentMax() != other.getSentimentMax()) 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) + SENTIMENT_MAX_FIELD_NUMBER; + hash = (53 * hash) + getSentimentMax(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs.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(); + sentimentMax_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs(this); + result.sentimentMax_ = sentimentMax_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.getDefaultInstance()) return this; + if (other.getSentimentMax() != 0) { + setSentimentMax(other.getSentimentMax()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sentimentMax_; + /** + * + * + *
+     * A sentiment is expressed as an integer ordinal, where higher value
+     * means a more positive sentiment. The range of sentiments that will be used
+     * is between 0 and sentimentMax (inclusive on both ends), and all the values
+     * in the range must be represented in the dataset before a model can be
+     * created.
+     * Only the Annotations with this sentimentMax will be used for training.
+     * sentimentMax value must be between 1 and 10 (inclusive).
+     * 
+ * + * int32 sentiment_max = 1; + * + * @return The sentimentMax. + */ + @java.lang.Override + public int getSentimentMax() { + return sentimentMax_; + } + /** + * + * + *
+     * A sentiment is expressed as an integer ordinal, where higher value
+     * means a more positive sentiment. The range of sentiments that will be used
+     * is between 0 and sentimentMax (inclusive on both ends), and all the values
+     * in the range must be represented in the dataset before a model can be
+     * created.
+     * Only the Annotations with this sentimentMax will be used for training.
+     * sentimentMax value must be between 1 and 10 (inclusive).
+     * 
+ * + * int32 sentiment_max = 1; + * + * @param value The sentimentMax to set. + * @return This builder for chaining. + */ + public Builder setSentimentMax(int value) { + + sentimentMax_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A sentiment is expressed as an integer ordinal, where higher value
+     * means a more positive sentiment. The range of sentiments that will be used
+     * is between 0 and sentimentMax (inclusive on both ends), and all the values
+     * in the range must be represented in the dataset before a model can be
+     * created.
+     * Only the Annotations with this sentimentMax will be used for training.
+     * sentimentMax value must be between 1 and 10 (inclusive).
+     * 
+ * + * int32 sentiment_max = 1; + * + * @return This builder for chaining. + */ + public Builder clearSentimentMax() { + + sentimentMax_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlTextSentimentInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlTextSentimentInputs(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java new file mode 100644 index 000000000..df2da33e8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextSentimentInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A sentiment is expressed as an integer ordinal, where higher value
+   * means a more positive sentiment. The range of sentiments that will be used
+   * is between 0 and sentimentMax (inclusive on both ends), and all the values
+   * in the range must be represented in the dataset before a model can be
+   * created.
+   * Only the Annotations with this sentimentMax will be used for training.
+   * sentimentMax value must be between 1 and 10 (inclusive).
+   * 
+ * + * int32 sentiment_max = 1; + * + * @return The sentimentMax. + */ + int getSentimentMax(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java new file mode 100644 index 000000000..4a6ffcacd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlTextSentimentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentiment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java new file mode 100644 index 000000000..8c1583d4c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java @@ -0,0 +1,870 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video Action Recognition
+ * Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition} + */ +public final class AutoMlVideoActionRecognition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + AutoMlVideoActionRecognitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoActionRecognition.newBuilder() to construct. + private AutoMlVideoActionRecognition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoActionRecognition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoActionRecognition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoActionRecognition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition + 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 TrainingJob that trains and uploads an AutoML Video Action Recognition
+   * Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoActionRecognition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoActionRecognition(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java new file mode 100644 index 000000000..d733bff74 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java @@ -0,0 +1,830 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs} + */ +public final class AutoMlVideoActionRecognitionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + AutoMlVideoActionRecognitionInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoActionRecognitionInputs.newBuilder() to construct. + private AutoMlVideoActionRecognitionInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoActionRecognitionInputs() { + modelType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoActionRecognitionInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoActionRecognitionInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which c annot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + CLOUD(1), + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + MOBILE_VERSATILE_1(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which c annot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + public static final int CLOUD_VALUE = 1; + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + public static final int MOBILE_VERSATILE_1_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD; + case 2: + return MOBILE_VERSATILE_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.UNRECOGNIZED + : result; + } + + 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) + obj; + + if (modelType_ != other.modelType_) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.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(); + modelType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs(this); + result.modelType_ = modelType_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoActionRecognitionInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoActionRecognitionInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java new file mode 100644 index 000000000..4d464ce48 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoActionRecognitionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java new file mode 100644 index 000000000..1c57fd92f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoActionRecognitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassification.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassification.java new file mode 100644 index 000000000..0d552a261 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassification.java @@ -0,0 +1,866 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video Classification Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification} + */ +public final class AutoMlVideoClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification) + AutoMlVideoClassificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoClassification.newBuilder() to construct. + private AutoMlVideoClassification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoClassification() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoClassification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoClassification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + 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 TrainingJob that trains and uploads an AutoML Video Classification Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassification + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoClassification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoClassification(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java new file mode 100644 index 000000000..36c98d0a4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java @@ -0,0 +1,830 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs} + */ +public final class AutoMlVideoClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + AutoMlVideoClassificationInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoClassificationInputs.newBuilder() to construct. + private AutoMlVideoClassificationInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoClassificationInputs() { + modelType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoClassificationInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoClassificationInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + CLOUD(1), + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + MOBILE_VERSATILE_1(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which cannot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + public static final int CLOUD_VALUE = 1; + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + public static final int MOBILE_VERSATILE_1_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD; + case 2: + return MOBILE_VERSATILE_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + + 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) + obj; + + if (modelType_ != other.modelType_) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.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(); + modelType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs(this); + result.modelType_ = modelType_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoClassificationInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoClassificationInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java new file mode 100644 index 000000000..a8f4ed6c9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + .ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java new file mode 100644 index 000000000..bda1a0e4a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java new file mode 100644 index 000000000..50907b19e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java @@ -0,0 +1,866 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video ObjectTracking Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking} + */ +public final class AutoMlVideoObjectTracking extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + AutoMlVideoObjectTrackingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoObjectTracking.newBuilder() to construct. + private AutoMlVideoObjectTracking(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoObjectTracking() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoObjectTracking(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoObjectTracking( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + 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 (inputs_ != null) { + output.writeMessage(1, getInputs()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking) + obj; + + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) 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 (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + 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 TrainingJob that trains and uploads an AutoML Video ObjectTracking Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking.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 (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking(this); + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking.getDefaultInstance()) return this; + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder + builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.newBuilder(inputs_) + .mergeFrom(value) + .buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + @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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoObjectTracking parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoObjectTracking(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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java new file mode 100644 index 000000000..f43b6b701 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java @@ -0,0 +1,926 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs} + */ +public final class AutoMlVideoObjectTrackingInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + AutoMlVideoObjectTrackingInputsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoMlVideoObjectTrackingInputs.newBuilder() to construct. + private AutoMlVideoObjectTrackingInputs( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoMlVideoObjectTrackingInputs() { + modelType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoMlVideoObjectTrackingInputs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutoMlVideoObjectTrackingInputs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + modelType_ = rawValue; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType} + */ + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which c annot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + CLOUD(1), + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + MOBILE_VERSATILE_1(2), + /** + * + * + *
+     * A versatile model that is meant to be exported (see
+     * ModelService.ExportModel) and used on a Google Coral device.
+     * 
+ * + * MOBILE_CORAL_VERSATILE_1 = 3; + */ + MOBILE_CORAL_VERSATILE_1(3), + /** + * + * + *
+     * A model that trades off quality for low latency, to be exported (see
+     * ModelService.ExportModel) and used on a Google Coral device.
+     * 
+ * + * MOBILE_CORAL_LOW_LATENCY_1 = 4; + */ + MOBILE_CORAL_LOW_LATENCY_1(4), + /** + * + * + *
+     * A versatile model that is meant to be exported (see
+     * ModelService.ExportModel) and used on an NVIDIA Jetson device.
+     * 
+ * + * MOBILE_JETSON_VERSATILE_1 = 5; + */ + MOBILE_JETSON_VERSATILE_1(5), + /** + * + * + *
+     * A model that trades off quality for low latency, to be exported (see
+     * ModelService.ExportModel) and used on an NVIDIA Jetson device.
+     * 
+ * + * MOBILE_JETSON_LOW_LATENCY_1 = 6; + */ + MOBILE_JETSON_LOW_LATENCY_1(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be set.
+     * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A model best tailored to be used within Google Cloud, and which c annot
+     * be exported. Default.
+     * 
+ * + * CLOUD = 1; + */ + public static final int CLOUD_VALUE = 1; + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) as a TensorFlow or
+     * TensorFlow Lite model and used on a mobile or edge device afterwards.
+     * 
+ * + * MOBILE_VERSATILE_1 = 2; + */ + public static final int MOBILE_VERSATILE_1_VALUE = 2; + /** + * + * + *
+     * A versatile model that is meant to be exported (see
+     * ModelService.ExportModel) and used on a Google Coral device.
+     * 
+ * + * MOBILE_CORAL_VERSATILE_1 = 3; + */ + public static final int MOBILE_CORAL_VERSATILE_1_VALUE = 3; + /** + * + * + *
+     * A model that trades off quality for low latency, to be exported (see
+     * ModelService.ExportModel) and used on a Google Coral device.
+     * 
+ * + * MOBILE_CORAL_LOW_LATENCY_1 = 4; + */ + public static final int MOBILE_CORAL_LOW_LATENCY_1_VALUE = 4; + /** + * + * + *
+     * A versatile model that is meant to be exported (see
+     * ModelService.ExportModel) and used on an NVIDIA Jetson device.
+     * 
+ * + * MOBILE_JETSON_VERSATILE_1 = 5; + */ + public static final int MOBILE_JETSON_VERSATILE_1_VALUE = 5; + /** + * + * + *
+     * A model that trades off quality for low latency, to be exported (see
+     * ModelService.ExportModel) and used on an NVIDIA Jetson device.
+     * 
+ * + * MOBILE_JETSON_LOW_LATENCY_1 = 6; + */ + public static final int MOBILE_JETSON_LOW_LATENCY_1_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return CLOUD; + case 2: + return MOBILE_VERSATILE_1; + case 3: + return MOBILE_CORAL_VERSATILE_1; + case 4: + return MOBILE_CORAL_LOW_LATENCY_1; + case 5: + return MOBILE_JETSON_VERSATILE_1; + case 6: + return MOBILE_JETSON_LOW_LATENCY_1; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.UNRECOGNIZED + : result; + } + + 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 (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) + obj; + + if (modelType_ != other.modelType_) 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) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.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(); + modelType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs(this); + result.modelType_ = modelType_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + + modelType_ = value; + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + result = + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + + modelType_ = 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.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoMlVideoObjectTrackingInputs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoMlVideoObjectTrackingInputs(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.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java new file mode 100644 index 000000000..c13ef9291 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoObjectTrackingInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + .ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java new file mode 100644 index 000000000..b8bc535aa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface AutoMlVideoObjectTrackingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java new file mode 100644 index 000000000..a2a492203 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java @@ -0,0 +1,828 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +/** + * + * + *
+ * Configuration for exporting test set predictions to a BigQuery table.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig} + */ +public final class ExportEvaluatedDataItemsConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + ExportEvaluatedDataItemsConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEvaluatedDataItemsConfig.newBuilder() to construct. + private ExportEvaluatedDataItemsConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEvaluatedDataItemsConfig() { + destinationBigqueryUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEvaluatedDataItemsConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportEvaluatedDataItemsConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + destinationBigqueryUri_ = s; + break; + } + case 16: + { + overrideExistingTable_ = input.readBool(); + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder.class); + } + + public static final int DESTINATION_BIGQUERY_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object destinationBigqueryUri_; + /** + * + * + *
+   * URI of desired destination BigQuery table. If not specified, then results
+   * are exported to the following auto-created BigQuery table:
+   * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+   * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The destinationBigqueryUri. + */ + @java.lang.Override + public java.lang.String getDestinationBigqueryUri() { + java.lang.Object ref = destinationBigqueryUri_; + 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(); + destinationBigqueryUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of desired destination BigQuery table. If not specified, then results
+   * are exported to the following auto-created BigQuery table:
+   * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+   * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The bytes for destinationBigqueryUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationBigqueryUriBytes() { + java.lang.Object ref = destinationBigqueryUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationBigqueryUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERRIDE_EXISTING_TABLE_FIELD_NUMBER = 2; + private boolean overrideExistingTable_; + /** + * + * + *
+   * If true and an export destination is specified, then the contents of the
+   * destination will be overwritten. Otherwise, if the export destination
+   * already exists, then the export operation will not trigger and a failure
+   * response is returned.
+   * 
+ * + * bool override_existing_table = 2; + * + * @return The overrideExistingTable. + */ + @java.lang.Override + public boolean getOverrideExistingTable() { + return overrideExistingTable_; + } + + 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 (!getDestinationBigqueryUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationBigqueryUri_); + } + if (overrideExistingTable_ != false) { + output.writeBool(2, overrideExistingTable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDestinationBigqueryUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationBigqueryUri_); + } + if (overrideExistingTable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, overrideExistingTable_); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + other = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) + obj; + + if (!getDestinationBigqueryUri().equals(other.getDestinationBigqueryUri())) return false; + if (getOverrideExistingTable() != other.getOverrideExistingTable()) 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) + DESTINATION_BIGQUERY_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationBigqueryUri().hashCode(); + hash = (37 * hash) + OVERRIDE_EXISTING_TABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOverrideExistingTable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + 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; + } + /** + * + * + *
+   * Configuration for exporting test set predictions to a BigQuery table.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.class, + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig.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(); + destinationBigqueryUri_ = ""; + + overrideExistingTable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + build() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + buildPartial() { + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + result = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig(this); + result.destinationBigqueryUri_ = destinationBigqueryUri_; + result.overrideExistingTable_ = overrideExistingTable_; + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance()) return this; + if (!other.getDestinationBigqueryUri().isEmpty()) { + destinationBigqueryUri_ = other.destinationBigqueryUri_; + onChanged(); + } + if (other.getOverrideExistingTable() != false) { + setOverrideExistingTable(other.getOverrideExistingTable()); + } + 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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object destinationBigqueryUri_ = ""; + /** + * + * + *
+     * URI of desired destination BigQuery table. If not specified, then results
+     * are exported to the following auto-created BigQuery table:
+     * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+     * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The destinationBigqueryUri. + */ + public java.lang.String getDestinationBigqueryUri() { + java.lang.Object ref = destinationBigqueryUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationBigqueryUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of desired destination BigQuery table. If not specified, then results
+     * are exported to the following auto-created BigQuery table:
+     * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+     * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The bytes for destinationBigqueryUri. + */ + public com.google.protobuf.ByteString getDestinationBigqueryUriBytes() { + java.lang.Object ref = destinationBigqueryUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationBigqueryUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of desired destination BigQuery table. If not specified, then results
+     * are exported to the following auto-created BigQuery table:
+     * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+     * 
+ * + * string destination_bigquery_uri = 1; + * + * @param value The destinationBigqueryUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationBigqueryUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationBigqueryUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of desired destination BigQuery table. If not specified, then results
+     * are exported to the following auto-created BigQuery table:
+     * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+     * 
+ * + * string destination_bigquery_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearDestinationBigqueryUri() { + + destinationBigqueryUri_ = getDefaultInstance().getDestinationBigqueryUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of desired destination BigQuery table. If not specified, then results
+     * are exported to the following auto-created BigQuery table:
+     * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+     * 
+ * + * string destination_bigquery_uri = 1; + * + * @param value The bytes for destinationBigqueryUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationBigqueryUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationBigqueryUri_ = value; + onChanged(); + return this; + } + + private boolean overrideExistingTable_; + /** + * + * + *
+     * If true and an export destination is specified, then the contents of the
+     * destination will be overwritten. Otherwise, if the export destination
+     * already exists, then the export operation will not trigger and a failure
+     * response is returned.
+     * 
+ * + * bool override_existing_table = 2; + * + * @return The overrideExistingTable. + */ + @java.lang.Override + public boolean getOverrideExistingTable() { + return overrideExistingTable_; + } + /** + * + * + *
+     * If true and an export destination is specified, then the contents of the
+     * destination will be overwritten. Otherwise, if the export destination
+     * already exists, then the export operation will not trigger and a failure
+     * response is returned.
+     * 
+ * + * bool override_existing_table = 2; + * + * @param value The overrideExistingTable to set. + * @return This builder for chaining. + */ + public Builder setOverrideExistingTable(boolean value) { + + overrideExistingTable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true and an export destination is specified, then the contents of the
+     * destination will be overwritten. Otherwise, if the export destination
+     * already exists, then the export operation will not trigger and a failure
+     * response is returned.
+     * 
+ * + * bool override_existing_table = 2; + * + * @return This builder for chaining. + */ + public Builder clearOverrideExistingTable() { + + overrideExistingTable_ = false; + 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.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + private static final com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEvaluatedDataItemsConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportEvaluatedDataItemsConfig(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.aiplatform.v1beta1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java new file mode 100644 index 000000000..ba79190bf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public interface ExportEvaluatedDataItemsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI of desired destination BigQuery table. If not specified, then results
+   * are exported to the following auto-created BigQuery table:
+   * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+   * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The destinationBigqueryUri. + */ + java.lang.String getDestinationBigqueryUri(); + /** + * + * + *
+   * URI of desired destination BigQuery table. If not specified, then results
+   * are exported to the following auto-created BigQuery table:
+   * <project_id>:export_evaluated_examples_<model_name>_<yyyy_MM_dd'T'HH_mm_ss_SSS'Z'>.evaluated_examples
+   * 
+ * + * string destination_bigquery_uri = 1; + * + * @return The bytes for destinationBigqueryUri. + */ + com.google.protobuf.ByteString getDestinationBigqueryUriBytes(); + + /** + * + * + *
+   * If true and an export destination is specified, then the contents of the
+   * destination will be overwritten. Otherwise, if the export destination
+   * already exists, then the export operation will not trigger and a failure
+   * response is returned.
+   * 
+ * + * bool override_existing_table = 2; + * + * @return The overrideExistingTable. + */ + boolean getOverrideExistingTable(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java new file mode 100644 index 000000000..c89d8c1a3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +public final class ExportEvaluatedDataItemsConfigProto { + private ExportEvaluatedDataItemsConfigProto() {} + + 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_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nfgoogle/cloud/aiplatform/v1beta1/schema" + + "/trainingjob/definition/export_evaluated" + + "_data_items_config.proto\022=google.cloud.a" + + "iplatform.v1beta1.schema.trainingjob.def" + + "inition\032\034google/api/annotations.proto\"c\n" + + "\036ExportEvaluatedDataItemsConfig\022 \n\030desti" + + "nation_bigquery_uri\030\001 \001(\t\022\037\n\027override_ex" + + "isting_table\030\002 \001(\010B\323\001\nAcom.google.cloud." + + "aiplatform.v1beta1.schema.trainingjob.de" + + "finitionB#ExportEvaluatedDataItemsConfig" + + "ProtoP\001Zggoogle.golang.org/genproto/goog" + + "leapis/cloud/aiplatform/v1beta1/schema/t" + + "rainingjob/definition;definitionb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor, + new java.lang.String[] { + "DestinationBigqueryUri", "OverrideExistingTable", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto new file mode 100644 index 000000000..8e355f9a6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto @@ -0,0 +1,228 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto"; +import "google/cloud/aiplatform/v1beta1/schema/geometry.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationPayloadProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// Annotation details specific to image classification. +message ImageClassificationAnnotation { + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 1; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 2; +} + +// Annotation details specific to image object detection. +message ImageBoundingBoxAnnotation { + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 1; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 2; + + // The leftmost coordinate of the bounding box. + double x_min = 3; + + // The rightmost coordinate of the bounding box. + double x_max = 4; + + // The topmost coordinate of the bounding box. + double y_min = 5; + + // The bottommost coordinate of the bounding box. + double y_max = 6; +} + +// Annotation details specific to image segmentation. +message ImageSegmentationAnnotation { + // The mask based segmentation annotation. + message MaskAnnotation { + // Google Cloud Storage URI that points to the mask image. The image must be + // in PNG format. It must have the same size as the DataItem's image. Each + // pixel in the image mask represents the AnnotationSpec which the pixel in + // the image DataItem belong to. Each color is mapped to one AnnotationSpec + // based on annotation_spec_colors. + string mask_gcs_uri = 1; + + // The mapping between color and AnnotationSpec for this Annotation. + repeated AnnotationSpecColor annotation_spec_colors = 2; + } + + // Represents a polygon in image. + message PolygonAnnotation { + // The vertexes are connected one by one and the last vertex is connected to + // the first one to represent a polygon. + repeated Vertex vertexes = 1; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 2; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 3; + } + + // Represents a polyline in image. + message PolylineAnnotation { + // The vertexes are connected one by one and the last vertex in not + // connected to the first one. + repeated Vertex vertexes = 1; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 2; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 3; + } + + oneof annotation { + // Mask based segmentation annotation. Only one mask annotation can exist + // for one image. + MaskAnnotation mask_annotation = 3; + + // Polygon annotation. + PolygonAnnotation polygon_annotation = 4; + + // Polyline annotation. + PolylineAnnotation polyline_annotation = 5; + } +} + +// Annotation details specific to text classification. +message TextClassificationAnnotation { + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 1; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 2; +} + +// Annotation details specific to text extraction. +message TextExtractionAnnotation { + // The segment of the text content. + TextSegment text_segment = 1; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 2; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 3; +} + +// The text segment inside of DataItem. +message TextSegment { + // Zero-based character index of the first character of the text + // segment (counting characters from the beginning of the text). + uint64 start_offset = 1; + + // Zero-based character index of the first character past the end of + // the text segment (counting character from the beginning of the text). + // The character at the end_offset is NOT included in the text segment. + uint64 end_offset = 2; + + // The text content in the segment for output only. + string content = 3; +} + +// Annotation details specific to text sentiment. +message TextSentimentAnnotation { + // The sentiment score for text. + int32 sentiment = 1; + + // The sentiment max score for text. + int32 sentiment_max = 2; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 3; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 4; +} + +// Annotation details specific to video classification. +message VideoClassificationAnnotation { + // This Annotation applies to the time period represented by the TimeSegment. + // If it's not set, the Annotation applies to the whole video. + TimeSegment time_segment = 1; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 2; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 3; +} + +// A time period inside of a DataItem that has a time dimension (e.g. video). +message TimeSegment { + // Start of the time segment (inclusive), represented as the duration since + // the start of the DataItem. + google.protobuf.Duration start_time_offset = 1; + + // End of the time segment (exclusive), represented as the duration since the + // start of the DataItem. + google.protobuf.Duration end_time_offset = 2; +} + +// Annotation details specific to video object tracking. +message VideoObjectTrackingAnnotation { + // A time (frame) of a video to which this annotation pertains. + // Represented as the duration since the video's start. + google.protobuf.Duration time_offset = 1; + + // The leftmost coordinate of the bounding box. + double x_min = 2; + + // The rightmost coordinate of the bounding box. + double x_max = 3; + + // The topmost coordinate of the bounding box. + double y_min = 4; + + // The bottommost coordinate of the bounding box. + double y_max = 5; + + // The instance of the object, expressed as a positive integer. Used to track + // the same object across different frames. + int64 instance_id = 6; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 7; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 8; +} + +// Annotation details specific to video action recognition. +message VideoActionRecognitionAnnotation { + // This Annotation applies to the time period represented by the TimeSegment. + // If it's not set, the Annotation applies to the whole video. + TimeSegment time_segment = 1; + + // The resource Id of the AnnotationSpec that this Annotation pertains to. + string annotation_spec_id = 2; + + // The display name of the AnnotationSpec that this Annotation pertains to. + string display_name = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto new file mode 100644 index 000000000..f5893a90a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto @@ -0,0 +1,40 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/type/color.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationSpecColorProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// An entry of mapping between color and AnnotationSpec. The mapping is used in +// segmentation mask. +message AnnotationSpecColor { + // The color of the AnnotationSpec in a segmentation mask. + google.type.Color color = 1; + + // The display name of the AnnotationSpec represented by the color in the + // segmentation mask. + string display_name = 2; + + // The ID of the AnnotationSpec represented by the color in the segmentation + // mask. + string id = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto new file mode 100644 index 000000000..5519d1ae8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "DataItemPayloadProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// Payload of Image DataItem. +message ImageDataItem { + // Required. Google Cloud Storage URI points to the original image in user's bucket. + // The image is up to 30MB in size. + string gcs_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The mime type of the content of the image. Only the images in below listed + // mime types are supported. + // - image/jpeg + // - image/gif + // - image/png + // - image/webp + // - image/bmp + // - image/tiff + // - image/vnd.microsoft.icon + string mime_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Payload of Video DataItem. +message VideoDataItem { + // Required. Google Cloud Storage URI points to the original video in user's bucket. + // The video is up to 50 GB in size and up to 3 hour in duration. + string gcs_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The mime type of the content of the video. Only the videos in below listed + // mime types are supported. + // Supported mime_type: + // - video/mp4 + // - video/avi + // - video/quicktime + string mime_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Payload of Text DataItem. +message TextDataItem { + // Output only. Google Cloud Storage URI points to the original text in user's bucket. + // The text file is up to 10MB in size. + string gcs_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto new file mode 100644 index 000000000..520b36380 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.aiplatform.v1beta1.schema; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "DatasetMetadataProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// The metadata of Datasets that contain Image DataItems. +message ImageDatasetMetadata { + // Points to a YAML file stored on Google Cloud Storage describing payload of + // the Image DataItems that belong to this Dataset. + string data_item_schema_uri = 1; + + // Google Cloud Storage Bucket name that contains the blob data of this + // Dataset. + string gcs_bucket = 2; +} + +// The metadata of Datasets that contain Text DataItems. +message TextDatasetMetadata { + // Points to a YAML file stored on Google Cloud Storage describing payload of + // the Text DataItems that belong to this Dataset. + string data_item_schema_uri = 1; + + // Google Cloud Storage Bucket name that contains the blob data of this + // Dataset. + string gcs_bucket = 2; +} + +// The metadata of Datasets that contain Video DataItems. +message VideoDatasetMetadata { + // Points to a YAML file stored on Google Cloud Storage describing payload of + // the Video DataItems that belong to this Dataset. + string data_item_schema_uri = 1; + + // Google Cloud Storage Bucket name that contains the blob data of this + // Dataset. + string gcs_bucket = 2; +} + +// The metadata of Datasets that contain tables data. +message TablesDatasetMetadata { + // The tables Dataset's data source. The Dataset doesn't store the data + // directly, but only pointer(s) to its data. + message InputConfig { + oneof source { + GcsSource gcs_source = 1; + + BigQuerySource bigquery_source = 2; + } + } + + message GcsSource { + // Google Cloud Storage URI to a input file, only .csv file is supported. + repeated string uri = 1; + } + + message BigQuerySource { + // The URI of a BigQuery table. + string uri = 1; + } + + InputConfig input_config = 1; +} + +// The metadata of Datasets that contain time series data. +message TimeSeriesDatasetMetadata { + // The time series Dataset's data source. The Dataset doesn't store the data + // directly, but only pointer(s) to its data. + message InputConfig { + oneof source { + GcsSource gcs_source = 1; + + BigQuerySource bigquery_source = 2; + } + } + + message GcsSource { + // Google Cloud Storage URI to a input file, only .csv file is supported. + repeated string uri = 1; + } + + message BigQuerySource { + // The URI of a BigQuery table. + string uri = 1; + } + + InputConfig input_config = 1; + + // The column name of the time series identifier column that identifies the + // time series. + string time_series_identifier_column = 2; + + // The column name of the time column that identifies time order in the time + // series. + string time_column = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/geometry.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/geometry.proto new file mode 100644 index 000000000..24c596f38 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/geometry.proto @@ -0,0 +1,35 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message Vertex { + // X coordinate. + double x = 1; + + // Y coordinate. + double y = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/io_format.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/io_format.proto new file mode 100644 index 000000000..432057d12 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/io_format.proto @@ -0,0 +1,480 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto"; +import "google/cloud/aiplatform/v1beta1/schema/geometry.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "IoFormatProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// Prediction input format for Image Classification. +message ImageClassificationPredictionInstance { + // The image bytes or GCS URI to make the prediction on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/gif + // - image/png + // - image/webp + // - image/bmp + // - image/tiff + // - image/vnd.microsoft.icon + string mime_type = 2; +} + +// Prediction input format for Image Object Detection. +message ImageObjectDetectionPredictionInstance { + // The image bytes or GCS URI to make the prediction on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/gif + // - image/png + // - image/webp + // - image/bmp + // - image/tiff + // - image/vnd.microsoft.icon + string mime_type = 2; +} + +// Prediction input format for Image Segmentation. +message ImageSegmentationPredictionInstance { + // The image bytes to make the predictions on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/png + string mime_type = 2; +} + +// Prediction input format for Video Classification. +message VideoClassificationPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} + +// Prediction input format for Video Classification. +message VideoObjectTrackingPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} + +// Prediction input format for Video Action Recognition. +message VideoActionRecognitionPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} + +// Prediction input format for Text Classification. +message TextClassificationPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; +} + +// Prediction input format for Text Sentiment. +message TextSentimentPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; +} + +// Prediction input format for Text Extraction. +message TextExtractionPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; + + // This field is only used for batch prediction. If a key is provided, the + // batch prediction result will by mapped to this key. If omitted, then the + // batch prediction result will contain the entire input instance. AI Platform + // will not check if keys in the request are duplicates, so it is up to the + // caller to ensure the keys are unique. + string key = 3; +} + +// Prediction model parameters for Image Classification. +message ImageClassificationPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. If this number is very high, the Model may return + // fewer predictions. Default value is 10. + int32 max_predictions = 2; +} + +// Prediction model parameters for Image Object Detection. +message ImageObjectDetectionPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. Note that number of returned predictions is also + // limited by metadata's predictionsLimit. Default value is 10. + int32 max_predictions = 2; +} + +// Prediction model parameters for Image Segmentation. +message ImageSegmentationPredictionParams { + // When the model predicts category of pixels of the image, it will only + // provide predictions for pixels that it is at least this much confident + // about. All other pixels will be classified as background. Default value is + // 0.5. + float confidence_threshold = 1; +} + +// Prediction model parameters for Video Classification. +message VideoClassificationPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. If this number is very high, the Model may return + // fewer predictions. Default value is 10,000. + int32 max_predictions = 2; + + // Set to true to request segment-level classification. AI Platform returns + // labels and their confidence scores for the entire time segment of the + // video that user specified in the input instance. + // Default value is true + bool segment_classification = 3; + + // Set to true to request shot-level classification. AI Platform determines + // the boundaries for each camera shot in the entire time segment of the + // video that user specified in the input instance. AI Platform then + // returns labels and their confidence scores for each detected shot, along + // with the start and end time of the shot. + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on the training data, but there are no metrics + // provided to describe that quality. + // Default value is false + bool shot_classification = 4; + + // Set to true to request classification for a video at one-second intervals. + // AI Platform returns labels and their confidence scores for each second of + // the entire time segment of the video that user specified in the input + // WARNING: Model evaluation is not done for this classification type, the + // quality of it depends on the training data, but there are no metrics + // provided to describe that quality. Default value is false + bool one_sec_interval_classification = 5; +} + +// Prediction model parameters for Video Object Tracking. +message VideoObjectTrackingPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The model only returns up to that many top, by confidence score, + // predictions per frame of the video. If this number is very high, the + // Model may return fewer predictions per frame. Default value is 50. + int32 max_predictions = 2; + + // Only bounding boxes with shortest edge at least that long as a relative + // value of video frame size are returned. Default value is 0.0. + float min_bounding_box_size = 3; +} + +// Prediction model parameters for Video Action Recognition. +message VideoActionRecognitionPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The model only returns up to that many top, by confidence score, + // predictions per frame of the video. If this number is very high, the + // Model may return fewer predictions per frame. Default value is 50. + int32 max_predictions = 2; +} + +// Represents a line of JSONL in the batch prediction output file. +message PredictionResult { + // Some identifier from the input so that the prediction can be mapped back to + // the input instance. + oneof input { + // User's input instance. + // Struct is used here instead of Any so that JsonFormat does not append an + // extra "@type" field when we convert the proto to JSON. + google.protobuf.Struct instance = 1; + + // Optional user-provided key from the input instance. + string key = 2; + } + + // The prediction result. + // Value is used here instead of Any so that JsonFormat does not append an + // extra "@type" field when we convert the proto to JSON and so we can + // represent array of objects. + google.protobuf.Value prediction = 3; +} + +// Represents a line of JSONL in the text sentiment batch prediction output +// file. This is a hack to allow printing of integer values. +message TextSentimentPredictionResult { + // Prediction output format for Text Sentiment. + message Prediction { + // The integer sentiment labels between 0 (inclusive) and sentimentMax label + // (inclusive), while 0 maps to the least positive sentiment and + // sentimentMax maps to the most positive one. The higher the score is, the + // more positive the sentiment in the text snippet is. Note: sentimentMax is + // an integer value between 1 (inclusive) and 10 (inclusive). + int32 sentiment = 1; + } + + // User's input instance. + TextSentimentPredictionInstance instance = 1; + + // The prediction result. + Prediction prediction = 2; +} + +// Prediction output format for Image Classification. +message ClassificationPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, ordered + // by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, order + // matches the IDs. + repeated string display_names = 2; + + // The Model's confidences in correctness of the predicted IDs, higher value + // means higher confidence. Order matches the Ids. + repeated float confidences = 3; +} + +// Prediction output format for Image Object Detection. +message ImageObjectDetectionPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, ordered + // by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, order + // matches the IDs. + repeated string display_names = 2; + + // The Model's confidences in correctness of the predicted IDs, higher value + // means higher confidence. Order matches the Ids. + repeated float confidences = 3; + + // Bounding boxes, i.e. the rectangles over the image, that pinpoint + // the found AnnotationSpecs. Given in order that matches the IDs. Each + // bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + // `yMax`, which represent the extremal coordinates of the box. They are + // relative to the image size, and the point 0,0 is in the top left + // of the image. + repeated google.protobuf.ListValue bboxes = 4; +} + +// Prediction output format for Video Classification. +message VideoClassificationPredictionResult { + // The resource ID of the AnnotationSpec that had been identified. + string id = 1; + + // The display name of the AnnotationSpec that had been identified. + string display_name = 2; + + // The type of the prediction. The requested types can be configured + // via parameters. This will be one of + // - segment-classification + // - shot-classification + // - one-sec-interval-classification + string type = 3; + + // The beginning, inclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. Note that for + // 'segment-classification' prediction type, this equals the original + // 'timeSegmentStart' from the input instance, for other types it is the + // start of a shot or a 1 second interval respectively. + google.protobuf.Duration time_segment_start = 4; + + // The end, exclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. Note that for + // 'segment-classification' prediction type, this equals the original + // 'timeSegmentEnd' from the input instance, for other types it is the end + // of a shot or a 1 second interval respectively. + google.protobuf.Duration time_segment_end = 5; + + // The Model's confidence in correction of this prediction, higher + // value means higher confidence. + google.protobuf.FloatValue confidence = 6; +} + +// Prediction output format for Video Object Tracking. +message VideoObjectTrackingPredictionResult { + // The fields `xMin`, `xMax`, `yMin`, and `yMax` refer to a bounding box, + // i.e. the rectangle over the video frame pinpointing the found + // AnnotationSpec. The coordinates are relative to the frame size, and the + // point 0,0 is in the top left of the frame. + message Frame { + // A time (frame) of a video in which the object has been detected. + // Expressed as a number of seconds as measured from the + // start of the video, with fractions up to a microsecond precision, and + // with "s" appended at the end. + google.protobuf.Duration time_offset = 1; + + // The leftmost coordinate of the bounding box. + google.protobuf.FloatValue x_min = 2; + + // The rightmost coordinate of the bounding box. + google.protobuf.FloatValue x_max = 3; + + // The topmost coordinate of the bounding box. + google.protobuf.FloatValue y_min = 4; + + // The bottommost coordinate of the bounding box. + google.protobuf.FloatValue y_max = 5; + } + + // The resource ID of the AnnotationSpec that had been identified. + string id = 1; + + // The display name of the AnnotationSpec that had been identified. + string display_name = 2; + + // The beginning, inclusive, of the video's time segment in which the + // object instance has been detected. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_start = 3; + + // The end, inclusive, of the video's time segment in which the + // object instance has been detected. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_end = 4; + + // The Model's confidence in correction of this prediction, higher + // value means higher confidence. + google.protobuf.FloatValue confidence = 5; + + // All of the frames of the video in which a single object instance has been + // detected. The bounding boxes in the frames identify the same object. + repeated Frame frames = 6; +} + +// Prediction output format for Text Extraction. +message TextExtractionPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, + // ordered by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, + // order matches the IDs. + repeated string display_names = 2; + + // The start offsets, inclusive, of the text segment in which the + // AnnotationSpec has been identified. Expressed as a zero-based number + // of characters as measured from the start of the text snippet. + repeated int64 text_segment_start_offsets = 3; + + // The end offsets, inclusive, of the text segment in which the + // AnnotationSpec has been identified. Expressed as a zero-based number + // of characters as measured from the start of the text snippet. + repeated int64 text_segment_end_offsets = 4; + + // The Model's confidences in correctness of the predicted IDs, higher + // value means higher confidence. Order matches the Ids. + repeated float confidences = 5; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto new file mode 100644 index 000000000..408f995fd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Image Classification. +message ImageClassificationPredictionInstance { + // The image bytes or GCS URI to make the prediction on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/gif + // - image/png + // - image/webp + // - image/bmp + // - image/tiff + // - image/vnd.microsoft.icon + string mime_type = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto new file mode 100644 index 000000000..37467912f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Image Object Detection. +message ImageObjectDetectionPredictionInstance { + // The image bytes or GCS URI to make the prediction on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/gif + // - image/png + // - image/webp + // - image/bmp + // - image/tiff + // - image/vnd.microsoft.icon + string mime_type = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto new file mode 100644 index 000000000..d5477020f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Image Segmentation. +message ImageSegmentationPredictionInstance { + // The image bytes to make the predictions on. + string content = 1; + + // The MIME type of the content of the image. Only the images in below listed + // MIME types are supported. + // - image/jpeg + // - image/png + string mime_type = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto new file mode 100644 index 000000000..8f6de3e63 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto @@ -0,0 +1,35 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Text Classification. +message TextClassificationPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto new file mode 100644 index 000000000..bb592d2d1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto @@ -0,0 +1,42 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextExtractionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Text Extraction. +message TextExtractionPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; + + // This field is only used for batch prediction. If a key is provided, the + // batch prediction result will by mapped to this key. If omitted, then the + // batch prediction result will contain the entire input instance. AI Platform + // will not check if keys in the request are duplicates, so it is up to the + // caller to ensure the keys are unique. + string key = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto new file mode 100644 index 000000000..8b12f9686 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto @@ -0,0 +1,35 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextSentimentPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Text Sentiment. +message TextSentimentPredictionInstance { + // The text snippet to make the predictions on. + string content = 1; + + // The MIME type of the text snippet. The supported MIME types are listed + // below. + // - text/plain + string mime_type = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto new file mode 100644 index 000000000..6bd59b8f2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Video Action Recognition. +message VideoActionRecognitionPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto new file mode 100644 index 000000000..1f1cdbdcc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Video Classification. +message VideoClassificationPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto new file mode 100644 index 000000000..53c34c952 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.instance"; + +// Prediction input format for Video Object Tracking. +message VideoObjectTrackingPredictionInstance { + // The Google Cloud Storage location of the video on which to perform the + // prediction. + string content = 1; + + // The MIME type of the content of the video. Only the following are + // supported: video/mp4 video/avi video/quicktime + string mime_type = 2; + + // The beginning, inclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision. + string time_segment_start = 3; + + // The end, exclusive, of the video's time segment on which to perform + // the prediction. Expressed as a number of seconds as measured from the + // start of the video, with "s" appended at the end. Fractions are allowed, + // up to a microsecond precision, and "Infinity" is allowed, which means the + // end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto new file mode 100644 index 000000000..c480a26e8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageClassificationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Image Classification. +message ImageClassificationPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. If this number is very high, the Model may return + // fewer predictions. Default value is 10. + int32 max_predictions = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto new file mode 100644 index 000000000..5a7d6f2b4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Image Object Detection. +message ImageObjectDetectionPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. Note that number of returned predictions is also + // limited by metadata's predictionsLimit. Default value is 10. + int32 max_predictions = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto new file mode 100644 index 000000000..8664ccf2c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto @@ -0,0 +1,33 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Image Segmentation. +message ImageSegmentationPredictionParams { + // When the model predicts category of pixels of the image, it will only + // provide predictions for pixels that it is at least this much confident + // about. All other pixels will be classified as background. Default value is + // 0.5. + float confidence_threshold = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto new file mode 100644 index 000000000..12a2e0a3b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Video Action Recognition. +message VideoActionRecognitionPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The model only returns up to that many top, by confidence score, + // predictions per frame of the video. If this number is very high, the + // Model may return fewer predictions per frame. Default value is 50. + int32 max_predictions = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto new file mode 100644 index 000000000..3fbd50741 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Video Classification. +message VideoClassificationPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The Model only returns up to that many top, by confidence score, + // predictions per instance. If this number is very high, the Model may return + // fewer predictions. Default value is 10,000. + int32 max_predictions = 2; + + // Set to true to request segment-level classification. AI Platform returns + // labels and their confidence scores for the entire time segment of the + // video that user specified in the input instance. + // Default value is true + bool segment_classification = 3; + + // Set to true to request shot-level classification. AI Platform determines + // the boundaries for each camera shot in the entire time segment of the + // video that user specified in the input instance. AI Platform then + // returns labels and their confidence scores for each detected shot, along + // with the start and end time of the shot. + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on the training data, but there are no metrics + // provided to describe that quality. + // Default value is false + bool shot_classification = 4; + + // Set to true to request classification for a video at one-second intervals. + // AI Platform returns labels and their confidence scores for each second of + // the entire time segment of the video that user specified in the input + // WARNING: Model evaluation is not done for this classification type, the + // quality of it depends on the training data, but there are no metrics + // provided to describe that quality. Default value is false + bool one_sec_interval_classification = 5; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto new file mode 100644 index 000000000..bd8cde0bb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto @@ -0,0 +1,40 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.params"; + +// Prediction model parameters for Video Object Tracking. +message VideoObjectTrackingPredictionParams { + // The Model only returns predictions with at least this confidence score. + // Default value is 0.0 + float confidence_threshold = 1; + + // The model only returns up to that many top, by confidence score, + // predictions per frame of the video. If this number is very high, the + // Model may return fewer predictions per frame. Default value is 50. + int32 max_predictions = 2; + + // Only bounding boxes with shortest edge at least that long as a relative + // value of video frame size are returned. Default value is 0.0. + float min_bounding_box_size = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto new file mode 100644 index 000000000..d86f17ce5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto @@ -0,0 +1,39 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Image and Text Classification. +message ClassificationPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, ordered + // by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, order + // matches the IDs. + repeated string display_names = 2; + + // The Model's confidences in correctness of the predicted IDs, higher value + // means higher confidence. Order matches the Ids. + repeated float confidences = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto new file mode 100644 index 000000000..6100bd86f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Image Object Detection. +message ImageObjectDetectionPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, ordered + // by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, order + // matches the IDs. + repeated string display_names = 2; + + // The Model's confidences in correctness of the predicted IDs, higher value + // means higher confidence. Order matches the Ids. + repeated float confidences = 3; + + // Bounding boxes, i.e. the rectangles over the image, that pinpoint + // the found AnnotationSpecs. Given in order that matches the IDs. Each + // bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + // `yMax`, which represent the extremal coordinates of the box. They are + // relative to the image size, and the point 0,0 is in the top left + // of the image. + repeated google.protobuf.ListValue bboxes = 4; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto new file mode 100644 index 000000000..15997bb16 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto @@ -0,0 +1,42 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Image Segmentation. +message ImageSegmentationPredictionResult { + // A PNG image where each pixel in the mask represents the category in which + // the pixel in the original image was predicted to belong to. The size of + // this image will be the same as the original image. The mapping between the + // AnntoationSpec and the color can be found in model's metadata. The model + // will choose the most likely category and if none of the categories reach + // the confidence threshold, the pixel will be marked as background. + bytes category_mask = 1; + + // A one channel image which is encoded as an 8bit lossless PNG. The size of + // the image will be the same as the original image. For a specific pixel, + // darker color means less confidence in correctness of the cateogry in the + // categoryMask for the corresponding pixel. Black means no confidence and + // white means complete confidence. + bytes confidence_mask = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto new file mode 100644 index 000000000..06dcbeb37 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TabularClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Tabular Classification. +message TabularClassificationPredictionResult { + // The name of the classes being classified, contains all possible values of + // the target column. + repeated string classes = 1; + + // The model's confidence in each class being correct, higher + // value means higher confidence. The N-th score corresponds to + // the N-th class in classes. + repeated float scores = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto new file mode 100644 index 000000000..521b270d3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TabularRegressionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Tabular Regression. +message TabularRegressionPredictionResult { + // The regression value. + float value = 1; + + // The lower bound of the prediction interval. + float lower_bound = 2; + + // The upper bound of the prediction interval. + float upper_bound = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto new file mode 100644 index 000000000..f8f153526 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TextExtractionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Text Extraction. +message TextExtractionPredictionResult { + // The resource IDs of the AnnotationSpecs that had been identified, + // ordered by the confidence score descendingly. + repeated int64 ids = 1; + + // The display names of the AnnotationSpecs that had been identified, + // order matches the IDs. + repeated string display_names = 2; + + // The start offsets, inclusive, of the text segment in which the + // AnnotationSpec has been identified. Expressed as a zero-based number + // of characters as measured from the start of the text snippet. + repeated int64 text_segment_start_offsets = 3; + + // The end offsets, inclusive, of the text segment in which the + // AnnotationSpec has been identified. Expressed as a zero-based number + // of characters as measured from the start of the text snippet. + repeated int64 text_segment_end_offsets = 4; + + // The Model's confidences in correctness of the predicted IDs, higher + // value means higher confidence. Order matches the Ids. + repeated float confidences = 5; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto new file mode 100644 index 000000000..08bf34f8b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TextSentimentPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Represents a line of JSONL in the text sentiment batch prediction output +// file. This is a hack to allow printing of integer values. +message TextSentimentPredictionResult { + // Prediction output format for Text Sentiment. + message Prediction { + // The integer sentiment labels between 0 (inclusive) and sentimentMax label + // (inclusive), while 0 maps to the least positive sentiment and + // sentimentMax maps to the most positive one. The higher the score is, the + // more positive the sentiment in the text snippet is. Note: sentimentMax is + // an integer value between 1 (inclusive) and 10 (inclusive). + int32 sentiment = 1; + } + + // User's input instance. + google.cloud.aiplatform.v1beta1.schema.predict.instance.TextSentimentPredictionInstance instance = 1; + + // The prediction result. + Prediction prediction = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto new file mode 100644 index 000000000..e06417366 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TimeSeriesForecastingPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Time Series Forecasting. +message TimeSeriesForecastingPredictionResult { + // The regression value. + float value = 1; + + // The lower bound of the prediction interval. + float lower_bound = 2; + + // The upper bound of the prediction interval. + float upper_bound = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto new file mode 100644 index 000000000..05bd7db93 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Video Action Recognition. +message VideoActionRecognitionPredictionResult { + // The resource ID of the AnnotationSpec that had been identified. + string id = 1; + + // The display name of the AnnotationSpec that had been identified. + string display_name = 2; + + // The beginning, inclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_start = 4; + + // The end, exclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_end = 5; + + // The Model's confidence in correction of this prediction, higher + // value means higher confidence. + google.protobuf.FloatValue confidence = 6; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto new file mode 100644 index 000000000..49e3f9767 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.predict.prediction; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Video Classification. +message VideoClassificationPredictionResult { + // The resource ID of the AnnotationSpec that had been identified. + string id = 1; + + // The display name of the AnnotationSpec that had been identified. + string display_name = 2; + + // The type of the prediction. The requested types can be configured + // via parameters. This will be one of + // - segment-classification + // - shot-classification + // - one-sec-interval-classification + string type = 3; + + // The beginning, inclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. Note that for + // 'segment-classification' prediction type, this equals the original + // 'timeSegmentStart' from the input instance, for other types it is the + // start of a shot or a 1 second interval respectively. + google.protobuf.Duration time_segment_start = 4; + + // The end, exclusive, of the video's time segment in which the + // AnnotationSpec has been identified. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. Note that for + // 'segment-classification' prediction type, this equals the original + // 'timeSegmentEnd' from the input instance, for other types it is the end + // of a shot or a 1 second interval respectively. + google.protobuf.Duration time_segment_end = 5; + + // The Model's confidence in correction of this prediction, higher + // value means higher confidence. + google.protobuf.FloatValue confidence = 6; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto new file mode 100644 index 000000000..2047a302e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto @@ -0,0 +1,79 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.aiplatform.v1beta1.schema.predict.prediction; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.predict.prediction"; + +// Prediction output format for Video Object Tracking. +message VideoObjectTrackingPredictionResult { + // The fields `xMin`, `xMax`, `yMin`, and `yMax` refer to a bounding box, + // i.e. the rectangle over the video frame pinpointing the found + // AnnotationSpec. The coordinates are relative to the frame size, and the + // point 0,0 is in the top left of the frame. + message Frame { + // A time (frame) of a video in which the object has been detected. + // Expressed as a number of seconds as measured from the + // start of the video, with fractions up to a microsecond precision, and + // with "s" appended at the end. + google.protobuf.Duration time_offset = 1; + + // The leftmost coordinate of the bounding box. + google.protobuf.FloatValue x_min = 2; + + // The rightmost coordinate of the bounding box. + google.protobuf.FloatValue x_max = 3; + + // The topmost coordinate of the bounding box. + google.protobuf.FloatValue y_min = 4; + + // The bottommost coordinate of the bounding box. + google.protobuf.FloatValue y_max = 5; + } + + // The resource ID of the AnnotationSpec that had been identified. + string id = 1; + + // The display name of the AnnotationSpec that had been identified. + string display_name = 2; + + // The beginning, inclusive, of the video's time segment in which the + // object instance has been detected. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_start = 3; + + // The end, inclusive, of the video's time segment in which the + // object instance has been detected. Expressed as a number of seconds as + // measured from the start of the video, with fractions up to a microsecond + // precision, and with "s" appended at the end. + google.protobuf.Duration time_segment_end = 4; + + // The Model's confidence in correction of this prediction, higher + // value means higher confidence. + google.protobuf.FloatValue confidence = 5; + + // All of the frames of the video in which a single object instance has been + // detected. The bounding boxes in the frames identify the same object. + repeated Frame frames = 6; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/saved_query_metadata.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/saved_query_metadata.proto new file mode 100644 index 000000000..d59957567 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/saved_query_metadata.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema; + +import "google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema"; +option java_multiple_files = true; +option java_outer_classname = "SavedQueryMetadataProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema"; + +// The metadata of SavedQuery contains TextSentiment Annotations. +message TextSentimentSavedQueryMetadata { + // The maximum sentiment of sentiment Anntoation in this SavedQuery. + int32 sentiment_max = 1; +} + +message VisualInspectionClassificationLabelSavedQueryMetadata { + // Whether or not the classification label is multi_label. + bool multi_label = 1; +} + +message VisualInspectionMaskSavedQueryMetadata { + // The mapping between color and AnnotationSpec for this SavedQuery. + repeated AnnotationSpecColor color_map = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto new file mode 100644 index 000000000..6b0bacf1c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto @@ -0,0 +1,296 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLForecastingProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Forecasting Model. +message AutoMlForecasting { + // The input parameters of this TrainingJob. + AutoMlForecastingInputs inputs = 1; + + // The metadata information. + AutoMlForecastingMetadata metadata = 2; +} + +message AutoMlForecastingInputs { + message Transformation { + // Training pipeline will infer the proper transformation based on the + // statistic of dataset. + message AutoTransformation { + string column_name = 1; + } + + // Training pipeline will perform following transformation functions. + // * The value converted to float32. + // * The z_score of the value. + // * log(value+1) when the value is greater than or equal to 0. Otherwise, + // this transformation is not applied and the value is considered a + // missing value. + // * z_score of log(value+1) when the value is greater than or equal to 0. + // Otherwise, this transformation is not applied and the value is + // considered a missing value. + // * A boolean value that indicates whether the value is valid. + message NumericTransformation { + string column_name = 1; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 2; + } + + // Training pipeline will perform following transformation functions. + // * The categorical string as is--no change to case, punctuation, + // spelling, + // tense, and so on. + // * Convert the category name to a dictionary lookup index and generate an + // embedding for each index. + // * Categories that appear less than 5 times in the training dataset are + // treated as the "unknown" category. The "unknown" category gets its own + // special lookup index and resulting embedding. + message CategoricalTransformation { + string column_name = 1; + } + + // Training pipeline will perform following transformation functions. + // * Apply the transformation functions for Numerical columns. + // * Determine the year, month, day,and weekday. Treat each value from the + // * timestamp as a Categorical column. + // * Invalid numerical values (for example, values that fall outside of a + // typical timestamp range, or are extreme values) receive no special + // treatment and are not removed. + message TimestampTransformation { + string column_name = 1; + + // The format in which that time field is expressed. The time_format must + // either be one of: + // * `unix-seconds` + // * `unix-milliseconds` + // * `unix-microseconds` + // * `unix-nanoseconds` + // (for respectively number of seconds, milliseconds, microseconds and + // nanoseconds since start of the Unix epoch); + // or be written in `strftime` syntax. If time_format is not set, then the + // default format is RFC 3339 `date-time` format, where + // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z) + string time_format = 2; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 3; + } + + // Training pipeline will perform following transformation functions. + // * The text as is--no change to case, punctuation, spelling, tense, and + // so + // on. + // * Tokenize text to words. Convert each words to a dictionary lookup + // index + // and generate an embedding for each index. Combine the embedding of all + // elements into a single embedding using the mean. + // * Tokenization is based on unicode script boundaries. + // * Missing values get their own lookup index and resulting embedding. + // * Stop-words receive no special treatment and are not removed. + message TextTransformation { + string column_name = 1; + } + + // Treats the column as numerical array and performs following + // transformation functions. + // * All transformations for Numerical types applied to the average of the + // all elements. + // * The average of empty arrays is treated as zero. + message NumericArrayTransformation { + string column_name = 1; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 2; + } + + // Treats the column as categorical array and performs following + // transformation functions. + // * For each element in the array, convert the category name to a + // dictionary + // lookup index and generate an embedding for each index. + // Combine the embedding of all elements into a single embedding using + // the mean. + // * Empty arrays treated as an embedding of zeroes. + message CategoricalArrayTransformation { + string column_name = 1; + } + + // Treats the column as text array and performs following transformation + // functions. + // * Concatenate all text values in the array into a single text value + // using + // a space (" ") as a delimiter, and then treat the result as a single + // text value. Apply the transformations for Text columns. + // * Empty arrays treated as an empty text. + message TextArrayTransformation { + string column_name = 1; + } + + // The transformation that the training pipeline will apply to the input + // columns. + oneof transformation_detail { + AutoTransformation auto = 1; + + NumericTransformation numeric = 2; + + CategoricalTransformation categorical = 3; + + TimestampTransformation timestamp = 4; + + TextTransformation text = 5; + + NumericArrayTransformation repeated_numeric = 6; + + CategoricalArrayTransformation repeated_categorical = 7; + + TextArrayTransformation repeated_text = 8; + } + } + + // A duration of time expressed in time granularity units. + message Period { + // The time granularity unit of this time period. + // The supported unit are: + // "hour" + // "day" + // "week" + // "month" + // "year" + string unit = 1; + + // The number of units per period, e.g. 3 weeks or 2 months. + int64 quantity = 2; + } + + // The name of the column that the model is to predict. + string target_column = 1; + + // The name of the column that identifies the time series. + string time_series_identifier_column = 2; + + // The name of the column that identifies time order in the time series. + string time_column = 3; + + // Each transformation will apply transform function to given input column. + // And the result will be used for training. + // When creating transformation for BigQuery Struct column, the column should + // be flattened using "." as the delimiter. + repeated Transformation transformations = 4; + + // Objective function the model is optimizing towards. The training process + // creates a model that optimizes the value of the objective + // function over the validation set. + // + // The supported optimization objectives: + // "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE). + // "minimize-mae" - Minimize mean-absolute error (MAE). + // "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE). + // "minimize-rmspe" - Minimize root-mean-squared percentage error (RMSPE). + // "minimize-wape-mae" - Minimize the combination of weighted absolute + // percentage error (WAPE) and mean-absolute-error (MAE). + string optimization_objective = 5; + + // Required. The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. + // + // The training cost of the model will not exceed this budget. The final cost + // will be attempted to be close to the budget, though may end up being (even) + // noticeably smaller - at the backend's discretion. This especially may + // happen when further model training ceases to provide any improvements. + // + // If the budget is set to a value known to be insufficient to train a + // model for the given dataset, the training won't be attempted and + // will error. + // + // The train budget must be between 1,000 and 72,000 milli node hours, + // inclusive. + int64 train_budget_milli_node_hours = 6; + + // Column name that should be used as the weight column. + // Higher values in this column give more importance to the row + // during model training. The column must have numeric values between 0 and + // 10000 inclusively; 0 means the row is ignored for training. If weight + // column field is not set, then all rows are assumed to have equal weight + // of 1. + string weight_column = 7; + + // Column names that should be used as static columns. + // The value of these columns are static per time series. + repeated string static_columns = 8; + + // Column names that should be used as time variant past only columns. + // This column contains information for the given entity (identified by the + // time_series_identifier_column) that is known for the past but not the + // future (e.g. population of a city in a given year, or weather on a given + // day). + repeated string time_variant_past_only_columns = 9; + + // Column names that should be used as time variant past and future columns. + // This column contains information for the given entity (identified by the + // key column) that is known for the past and the future + repeated string time_variant_past_and_future_columns = 10; + + // Expected difference in time granularity between rows in the data. If it is + // not set, the period is inferred from data. + Period period = 11; + + // The number of periods offset into the future as the start of the forecast + // window (the window of future values to predict, relative to the present.), + // where each period is one unit of granularity as defined by the `period` + // field above. Default to 0. Inclusive. + int64 forecast_window_start = 12; + + // The number of periods offset into the future as the end of the forecast + // window (the window of future values to predict, relative to the present.), + // where each period is one unit of granularity as defined by the `period` + // field above. Inclusive. + int64 forecast_window_end = 13; + + // The number of periods offset into the past to restrict past sequence, where + // each period is one unit of granularity as defined by the `period`. Default + // value 0 means that it lets algorithm to define the value. Inclusive. + int64 past_horizon = 14; + + // Configuration for exporting test set predictions to a BigQuery table. If + // this configuration is absent, then the export is not performed. + ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 15; +} + +// Model metadata specific to AutoML Forecasting. +message AutoMlForecastingMetadata { + // Output only. The actual training cost of the model, expressed in milli + // node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed + // to not exceed the train budget. + int64 train_cost_milli_node_hours = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto new file mode 100644 index 000000000..024cfef7a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto @@ -0,0 +1,125 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Image Classification Model. +message AutoMlImageClassification { + // The input parameters of this TrainingJob. + AutoMlImageClassificationInputs inputs = 1; + + // The metadata information. + AutoMlImageClassificationMetadata metadata = 2; +} + +message AutoMlImageClassificationInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A Model best tailored to be used within Google Cloud, and which cannot + // be exported. + // Default. + CLOUD = 1; + + // A model that, in addition to being available within Google + // Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow + // or Core ML model and used on a mobile or edge device afterwards. + // Expected to have low latency, but may have lower prediction + // quality than other mobile models. + MOBILE_TF_LOW_LATENCY_1 = 2; + + // A model that, in addition to being available within Google + // Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow + // or Core ML model and used on a mobile or edge device with afterwards. + MOBILE_TF_VERSATILE_1 = 3; + + // A model that, in addition to being available within Google + // Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow + // or Core ML model and used on a mobile or edge device afterwards. + // Expected to have a higher latency, but should also have a higher + // prediction quality than other mobile models. + MOBILE_TF_HIGH_ACCURACY_1 = 4; + } + + ModelType model_type = 1; + + // The ID of the `base` model. If it is specified, the new model will be + // trained based on the `base` model. Otherwise, the new model will be + // trained from scratch. The `base` model must be in the same + // Project and Location as the new Model to train, and have the same + // modelType. + string base_model_id = 2; + + // The training budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // metadata.costMilliNodeHours will be equal or less than this value. + // If further model training ceases to provide any improvements, it will + // stop without using the full budget and the metadata.successfulStopReason + // will be `model-converged`. + // Note, node_hour = actual_hour * number_of_nodes_involved. + // For modelType `cloud`(default), the budget must be between 8,000 + // and 800,000 milli node hours, inclusive. The default value is 192,000 + // which represents one day in wall time, considering 8 nodes are used. + // For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`, + // `mobile-tf-high-accuracy-1`, the training budget must be between + // 1,000 and 100,000 milli node hours, inclusive. + // The default value is 24,000 which represents one day in wall time on a + // single node that is used. + int64 budget_milli_node_hours = 3; + + // Use the entire training budget. This disables the early stopping feature. + // When false the early stopping feature is enabled, which means that + // AutoML Image Classification might stop training before the entire + // training budget has been used. + bool disable_early_stopping = 4; + + // If false, a single-label (multi-class) Model will be trained (i.e. + // assuming that for each image just up to one annotation may be + // applicable). If true, a multi-label Model will be trained (i.e. + // assuming that for each image multiple annotations may be applicable). + bool multi_label = 5; +} + +message AutoMlImageClassificationMetadata { + enum SuccessfulStopReason { + // Should not be set. + SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + + // The inputs.budgetMilliNodeHours had been reached. + BUDGET_REACHED = 1; + + // Further training of the Model ceased to increase its quality, since it + // already has converged. + MODEL_CONVERGED = 2; + } + + // The actual training cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed inputs.budgetMilliNodeHours. + int64 cost_milli_node_hours = 1; + + // For successful job completions, this is the reason why the job has + // finished. + SuccessfulStopReason successful_stop_reason = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto new file mode 100644 index 000000000..c83d8e3be --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto @@ -0,0 +1,117 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageObjectDetectionProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Image Object Detection Model. +message AutoMlImageObjectDetection { + // The input parameters of this TrainingJob. + AutoMlImageObjectDetectionInputs inputs = 1; + + // The metadata information + AutoMlImageObjectDetectionMetadata metadata = 2; +} + +message AutoMlImageObjectDetectionInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A model best tailored to be used within Google Cloud, and which cannot + // be exported. Expected to have a higher latency, but should also have a + // higher prediction quality than other cloud models. + CLOUD_HIGH_ACCURACY_1 = 1; + + // A model best tailored to be used within Google Cloud, and which cannot + // be exported. Expected to have a low latency, but may have lower + // prediction quality than other cloud models. + CLOUD_LOW_LATENCY_1 = 2; + + // A model that, in addition to being available within Google + // Cloud can also be exported (see ModelService.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 mobile models. + MOBILE_TF_LOW_LATENCY_1 = 3; + + // A model that, in addition to being available within Google + // Cloud can also be exported (see ModelService.ExportModel) and + // used on a mobile or edge device with TensorFlow afterwards. + MOBILE_TF_VERSATILE_1 = 4; + + // A model that, in addition to being available within Google + // Cloud, can also be exported (see ModelService.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 mobile models. + MOBILE_TF_HIGH_ACCURACY_1 = 5; + } + + ModelType model_type = 1; + + // The training budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // metadata.costMilliNodeHours will be equal or less than this value. + // If further model training ceases to provide any improvements, it will + // stop without using the full budget and the metadata.successfulStopReason + // will be `model-converged`. + // Note, node_hour = actual_hour * number_of_nodes_involved. + // For modelType `cloud`(default), the budget must be between 20,000 + // and 900,000 milli node hours, inclusive. The default value is 216,000 + // which represents one day in wall time, considering 9 nodes are used. + // For model types `mobile-tf-low-latency-1`, `mobile-tf-versatile-1`, + // `mobile-tf-high-accuracy-1` + // the training budget must be between 1,000 and 100,000 milli node hours, + // inclusive. The default value is 24,000 which represents one day in + // wall time on a single node that is used. + int64 budget_milli_node_hours = 2; + + // Use the entire training budget. This disables the early stopping feature. + // When false the early stopping feature is enabled, which means that AutoML + // Image Object Detection might stop training before the entire training + // budget has been used. + bool disable_early_stopping = 3; +} + +message AutoMlImageObjectDetectionMetadata { + enum SuccessfulStopReason { + // Should not be set. + SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + + // The inputs.budgetMilliNodeHours had been reached. + BUDGET_REACHED = 1; + + // Further training of the Model ceased to increase its quality, since it + // already has converged. + MODEL_CONVERGED = 2; + } + + // The actual training cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed inputs.budgetMilliNodeHours. + int64 cost_milli_node_hours = 1; + + // For successful job completions, this is the reason why the job has + // finished. + SuccessfulStopReason successful_stop_reason = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto new file mode 100644 index 000000000..e6625da75 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto @@ -0,0 +1,96 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageSegmentationProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Image Segmentation Model. +message AutoMlImageSegmentation { + // The input parameters of this TrainingJob. + AutoMlImageSegmentationInputs inputs = 1; + + // The metadata information. + AutoMlImageSegmentationMetadata metadata = 2; +} + +message AutoMlImageSegmentationInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A model to be used via prediction calls to uCAIP API. Expected + // to have a higher latency, but should also have a higher prediction + // quality than other models. + CLOUD_HIGH_ACCURACY_1 = 1; + + // A model to be used via prediction calls to uCAIP API. Expected + // to have a lower latency but relatively lower prediction quality. + CLOUD_LOW_ACCURACY_1 = 2; + } + + ModelType model_type = 1; + + // The training budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // metadata.costMilliNodeHours will be equal or less than this value. + // If further model training ceases to provide any improvements, it will + // stop without using the full budget and the metadata.successfulStopReason + // will be `model-converged`. + // Note, node_hour = actual_hour * number_of_nodes_involved. Or + // actaul_wall_clock_hours = train_budget_milli_node_hours / + // (number_of_nodes_involved * 1000) + // For modelType `cloud-high-accuracy-1`(default), the budget must be between + // 20,000 and 2,000,000 milli node hours, inclusive. The default value is + // 192,000 which represents one day in wall time + // (1000 milli * 24 hours * 8 nodes). + int64 budget_milli_node_hours = 2; + + // The ID of the `base` model. If it is specified, the new model will be + // trained based on the `base` model. Otherwise, the new model will be + // trained from scratch. The `base` model must be in the same + // Project and Location as the new Model to train, and have the same + // modelType. + string base_model_id = 3; +} + +message AutoMlImageSegmentationMetadata { + enum SuccessfulStopReason { + // Should not be set. + SUCCESSFUL_STOP_REASON_UNSPECIFIED = 0; + + // The inputs.budgetMilliNodeHours had been reached. + BUDGET_REACHED = 1; + + // Further training of the Model ceased to increase its quality, since it + // already has converged. + MODEL_CONVERGED = 2; + } + + // The actual training cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed inputs.budgetMilliNodeHours. + int64 cost_milli_node_hours = 1; + + // For successful job completions, this is the reason why the job has + // finished. + SuccessfulStopReason successful_stop_reason = 2; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto new file mode 100644 index 000000000..8cf8eeb99 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto @@ -0,0 +1,278 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTablesProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Tables Model. +message AutoMlTables { + // The input parameters of this TrainingJob. + AutoMlTablesInputs inputs = 1; + + // The metadata information. + AutoMlTablesMetadata metadata = 2; +} + +message AutoMlTablesInputs { + message Transformation { + // Training pipeline will infer the proper transformation based on the + // statistic of dataset. + message AutoTransformation { + string column_name = 1; + } + + // Training pipeline will perform following transformation functions. + // * The value converted to float32. + // * The z_score of the value. + // * log(value+1) when the value is greater than or equal to 0. Otherwise, + // this transformation is not applied and the value is considered a + // missing value. + // * z_score of log(value+1) when the value is greater than or equal to 0. + // Otherwise, this transformation is not applied and the value is + // considered a missing value. + // * A boolean value that indicates whether the value is valid. + message NumericTransformation { + string column_name = 1; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 2; + } + + // Training pipeline will perform following transformation functions. + // * The categorical string as is--no change to case, punctuation, + // spelling, + // tense, and so on. + // * Convert the category name to a dictionary lookup index and generate an + // embedding for each index. + // * Categories that appear less than 5 times in the training dataset are + // treated as the "unknown" category. The "unknown" category gets its own + // special lookup index and resulting embedding. + message CategoricalTransformation { + string column_name = 1; + } + + // Training pipeline will perform following transformation functions. + // * Apply the transformation functions for Numerical columns. + // * Determine the year, month, day,and weekday. Treat each value from the + // * timestamp as a Categorical column. + // * Invalid numerical values (for example, values that fall outside of a + // typical timestamp range, or are extreme values) receive no special + // treatment and are not removed. + message TimestampTransformation { + string column_name = 1; + + // The format in which that time field is expressed. The time_format must + // either be one of: + // * `unix-seconds` + // * `unix-milliseconds` + // * `unix-microseconds` + // * `unix-nanoseconds` + // (for respectively number of seconds, milliseconds, microseconds and + // nanoseconds since start of the Unix epoch); + // or be written in `strftime` syntax. If time_format is not set, then the + // default format is RFC 3339 `date-time` format, where + // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z) + string time_format = 2; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 3; + } + + // Training pipeline will perform following transformation functions. + // * The text as is--no change to case, punctuation, spelling, tense, and + // so + // on. + // * Tokenize text to words. Convert each words to a dictionary lookup + // index + // and generate an embedding for each index. Combine the embedding of all + // elements into a single embedding using the mean. + // * Tokenization is based on unicode script boundaries. + // * Missing values get their own lookup index and resulting embedding. + // * Stop-words receive no special treatment and are not removed. + message TextTransformation { + string column_name = 1; + } + + // Treats the column as numerical array and performs following + // transformation functions. + // * All transformations for Numerical types applied to the average of the + // all elements. + // * The average of empty arrays is treated as zero. + message NumericArrayTransformation { + string column_name = 1; + + // If invalid values is allowed, the training pipeline will create a + // boolean feature that indicated whether the value is valid. + // Otherwise, the training pipeline will discard the input row from + // trainining data. + bool invalid_values_allowed = 2; + } + + // Treats the column as categorical array and performs following + // transformation functions. + // * For each element in the array, convert the category name to a + // dictionary + // lookup index and generate an embedding for each index. + // Combine the embedding of all elements into a single embedding using + // the mean. + // * Empty arrays treated as an embedding of zeroes. + message CategoricalArrayTransformation { + string column_name = 1; + } + + // Treats the column as text array and performs following transformation + // functions. + // * Concatenate all text values in the array into a single text value + // using + // a space (" ") as a delimiter, and then treat the result as a single + // text value. Apply the transformations for Text columns. + // * Empty arrays treated as an empty text. + message TextArrayTransformation { + string column_name = 1; + } + + // The transformation that the training pipeline will apply to the input + // columns. + oneof transformation_detail { + AutoTransformation auto = 1; + + NumericTransformation numeric = 2; + + CategoricalTransformation categorical = 3; + + TimestampTransformation timestamp = 4; + + TextTransformation text = 5; + + NumericArrayTransformation repeated_numeric = 6; + + CategoricalArrayTransformation repeated_categorical = 7; + + TextArrayTransformation repeated_text = 8; + } + } + + // Additional optimization objective configuration. Required for + // `maximize-precision-at-recall` and `maximize-recall-at-precision`, + // otherwise unused. + oneof additional_optimization_objective_config { + // Required when optimization_objective is "maximize-precision-at-recall". + // Must be between 0 and 1, inclusive. + float optimization_objective_recall_value = 5; + + // Required when optimization_objective is "maximize-recall-at-precision". + // Must be between 0 and 1, inclusive. + float optimization_objective_precision_value = 6; + } + + // The type of prediction the Model is to produce. + // "classification" - Predict one out of multiple target values is + // picked for each row. + // "regression" - Predict a value based on its relation to other values. + // This type is available only to columns that contain + // semantically numeric values, i.e. integers or floating + // point number, even if stored as e.g. strings. + string prediction_type = 1; + + // The column name of the target column that the model is to predict. + string target_column = 2; + + // Each transformation will apply transform function to given input column. + // And the result will be used for training. + // When creating transformation for BigQuery Struct column, the column should + // be flattened using "." as the delimiter. + repeated Transformation transformations = 3; + + // Objective function the model is optimizing towards. The training process + // creates a model that maximizes/minimizes the value of the objective + // function over the validation set. + // + // The supported optimization objectives depend on the prediction type. + // If the field is not set, a default objective function is used. + // + // classification (binary): + // "maximize-au-roc" (default) - Maximize the area under the receiver + // operating characteristic (ROC) curve. + // "minimize-log-loss" - Minimize log loss. + // "maximize-au-prc" - Maximize the area under the precision-recall curve. + // "maximize-precision-at-recall" - Maximize precision for a specified + // recall value. + // "maximize-recall-at-precision" - Maximize recall for a specified + // precision value. + // + // classification (multi-class): + // "minimize-log-loss" (default) - Minimize log loss. + // + // regression: + // "minimize-rmse" (default) - Minimize root-mean-squared error (RMSE). + // "minimize-mae" - Minimize mean-absolute error (MAE). + // "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE). + string optimization_objective = 4; + + // Required. The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. + // + // The training cost of the model will not exceed this budget. The final cost + // will be attempted to be close to the budget, though may end up being (even) + // noticeably smaller - at the backend's discretion. This especially may + // happen when further model training ceases to provide any improvements. + // + // If the budget is set to a value known to be insufficient to train a + // model for the given dataset, the training won't be attempted and + // will error. + // + // The train budget must be between 1,000 and 72,000 milli node hours, + // inclusive. + int64 train_budget_milli_node_hours = 7; + + // Use the entire training budget. This disables the early stopping feature. + // By default, the early stopping feature is enabled, which means that AutoML + // Tables might stop training before the entire training budget has been used. + bool disable_early_stopping = 8; + + // Column name that should be used as the weight column. + // Higher values in this column give more importance to the row + // during model training. The column must have numeric values between 0 and + // 10000 inclusively; 0 means the row is ignored for training. If weight + // column field is not set, then all rows are assumed to have equal weight + // of 1. + string weight_column_name = 9; + + // Configuration for exporting test set predictions to a BigQuery table. If + // this configuration is absent, then the export is not performed. + ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; +} + +// Model metadata specific to AutoML Tables. +message AutoMlTablesMetadata { + // Output only. The actual training cost of the model, expressed in milli + // node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed + // to not exceed the train budget. + int64 train_cost_milli_node_hours = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto new file mode 100644 index 000000000..8cc60b00b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto @@ -0,0 +1,34 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Text Classification Model. +message AutoMlTextClassification { + // The input parameters of this TrainingJob. + AutoMlTextClassificationInputs inputs = 1; +} + +message AutoMlTextClassificationInputs { + bool multi_label = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto new file mode 100644 index 000000000..f979c0350 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto @@ -0,0 +1,34 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextExtractionProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Text Extraction Model. +message AutoMlTextExtraction { + // The input parameters of this TrainingJob. + AutoMlTextExtractionInputs inputs = 1; +} + +message AutoMlTextExtractionInputs { + +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto new file mode 100644 index 000000000..a54a344e8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextSentimentProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Text Sentiment Model. +message AutoMlTextSentiment { + // The input parameters of this TrainingJob. + AutoMlTextSentimentInputs inputs = 1; +} + +message AutoMlTextSentimentInputs { + // A sentiment is expressed as an integer ordinal, where higher value + // means a more positive sentiment. The range of sentiments that will be used + // is between 0 and sentimentMax (inclusive on both ends), and all the values + // in the range must be represented in the dataset before a model can be + // created. + // Only the Annotations with this sentimentMax will be used for training. + // sentimentMax value must be between 1 and 10 (inclusive). + int32 sentiment_max = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto new file mode 100644 index 000000000..53ed93d40 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoActionRecognitionProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Video Action Recognition +// Model. +message AutoMlVideoActionRecognition { + // The input parameters of this TrainingJob. + AutoMlVideoActionRecognitionInputs inputs = 1; +} + +message AutoMlVideoActionRecognitionInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A model best tailored to be used within Google Cloud, and which c annot + // be exported. Default. + CLOUD = 1; + + // A model that, in addition to being available within Google Cloud, can + // also be exported (see ModelService.ExportModel) as a TensorFlow or + // TensorFlow Lite model and used on a mobile or edge device afterwards. + MOBILE_VERSATILE_1 = 2; + } + + ModelType model_type = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto new file mode 100644 index 000000000..5bb852d6d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Video Classification Model. +message AutoMlVideoClassification { + // The input parameters of this TrainingJob. + AutoMlVideoClassificationInputs inputs = 1; +} + +message AutoMlVideoClassificationInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A model best tailored to be used within Google Cloud, and which cannot + // be exported. Default. + CLOUD = 1; + + // A model that, in addition to being available within Google Cloud, can + // also be exported (see ModelService.ExportModel) as a TensorFlow or + // TensorFlow Lite model and used on a mobile or edge device afterwards. + MOBILE_VERSATILE_1 = 2; + } + + ModelType model_type = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto new file mode 100644 index 000000000..84f945e28 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoObjectTrackingProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// A TrainingJob that trains and uploads an AutoML Video ObjectTracking Model. +message AutoMlVideoObjectTracking { + // The input parameters of this TrainingJob. + AutoMlVideoObjectTrackingInputs inputs = 1; +} + +message AutoMlVideoObjectTrackingInputs { + enum ModelType { + // Should not be set. + MODEL_TYPE_UNSPECIFIED = 0; + + // A model best tailored to be used within Google Cloud, and which c annot + // be exported. Default. + CLOUD = 1; + + // A model that, in addition to being available within Google Cloud, can + // also be exported (see ModelService.ExportModel) as a TensorFlow or + // TensorFlow Lite model and used on a mobile or edge device afterwards. + MOBILE_VERSATILE_1 = 2; + + // A versatile model that is meant to be exported (see + // ModelService.ExportModel) and used on a Google Coral device. + MOBILE_CORAL_VERSATILE_1 = 3; + + // A model that trades off quality for low latency, to be exported (see + // ModelService.ExportModel) and used on a Google Coral device. + MOBILE_CORAL_LOW_LATENCY_1 = 4; + + // A versatile model that is meant to be exported (see + // ModelService.ExportModel) and used on an NVIDIA Jetson device. + MOBILE_JETSON_VERSATILE_1 = 5; + + // A model that trades off quality for low latency, to be exported (see + // ModelService.ExportModel) and used on an NVIDIA Jetson device. + MOBILE_JETSON_LOW_LATENCY_1 = 6; + } + + ModelType model_type = 1; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto new file mode 100644 index 000000000..0125794bf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto @@ -0,0 +1,39 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "ExportEvaluatedDataItemsConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition"; + +// Configuration for exporting test set predictions to a BigQuery table. +message ExportEvaluatedDataItemsConfig { + // URI of desired destination BigQuery table. If not specified, then results + // are exported to the following auto-created BigQuery table: + // + // :export_evaluated_examples__.evaluated_examples + string destination_bigquery_uri = 1; + + // If true and an export destination is specified, then the contents of the + // destination will be overwritten. Otherwise, if the export destination + // already exists, then the export operation will not trigger and a failure + // response is returned. + bool override_existing_table = 2; +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 7c44611c2..c3998bc51 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,33 +29,18 @@ com.google.cloud google-cloud-aiplatform - 0.0.1-SNAPSHOT + 0.1.0 com.google.cloud google-cloud-storage - 1.113.2 + 1.113.8 com.google.protobuf protobuf-java-util - 4.0.0-rc-1 - - - com.google.cloud - google-cloud-storage - 1.111.0 - - - com.google.cloud - google-cloud-storage - 1.113.1 - - - com.google.protobuf - protobuf-java-util - 4.0.0-rc-1 + 4.0.0-rc-2 junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 9cb7e8ea4..c61908730 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -23,33 +23,23 @@ UTF-8 - + com.google.cloud google-cloud-aiplatform - 0.0.1-SNAPSHOT + 0.2.0 com.google.cloud google-cloud-storage - 1.113.2 + 1.113.8 com.google.protobuf protobuf-java-util - 4.0.0-rc-1 - - - com.google.cloud - google-cloud-storage - 1.113.1 - - - com.google.protobuf - protobuf-java-util - 4.0.0-rc-1 + 4.0.0-rc-2 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index bad1d0b69..f66b38d81 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,18 +27,23 @@ com.google.cloud google-cloud-aiplatform - 0.0.1-SNAPSHOT + 0.1.1-SNAPSHOT com.google.cloud google-cloud-storage - 1.113.2 + 1.113.8 com.google.protobuf protobuf-java-util - 4.0.0-rc-1 + 4.0.0-rc-2 + + + com.google.code.gson + gson + 2.8.6 junit diff --git a/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobBigquerySample.java b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobBigquerySample.java new file mode 100644 index 000000000..5ccad051a --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobBigquerySample.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_batch_prediction_job_bigquery_sample] +import com.google.cloud.aiplatform.v1beta1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1beta1.BigQueryDestination; +import com.google.cloud.aiplatform.v1beta1.BigQuerySource; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.ModelName; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateBatchPredictionJobBigquerySample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String modelName = "MODEL_NAME"; + String instancesFormat = "INSTANCES_FORMAT"; + String bigquerySourceInputUri = "BIGQUERY_SOURCE_INPUT_URI"; + String predictionsFormat = "PREDICTIONS_FORMAT"; + String bigqueryDestinationOutputUri = "BIGQUERY_DESTINATION_OUTPUT_URI"; + createBatchPredictionJobBigquerySample( + project, + displayName, + modelName, + instancesFormat, + bigquerySourceInputUri, + predictionsFormat, + bigqueryDestinationOutputUri); + } + + static void createBatchPredictionJobBigquerySample( + String project, + String displayName, + String model, + String instancesFormat, + String bigquerySourceInputUri, + String predictionsFormat, + String bigqueryDestinationOutputUri) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + JsonObject jsonModelParameters = new JsonObject(); + Value.Builder modelParametersBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonModelParameters.toString(), modelParametersBuilder); + Value modelParameters = modelParametersBuilder.build(); + BigQuerySource bigquerySource = + BigQuerySource.newBuilder().setInputUri(bigquerySourceInputUri).build(); + BatchPredictionJob.InputConfig inputConfig = + BatchPredictionJob.InputConfig.newBuilder() + .setInstancesFormat(instancesFormat) + .setBigquerySource(bigquerySource) + .build(); + BigQueryDestination bigqueryDestination = + BigQueryDestination.newBuilder().setOutputUri(bigqueryDestinationOutputUri).build(); + BatchPredictionJob.OutputConfig outputConfig = + BatchPredictionJob.OutputConfig.newBuilder() + .setPredictionsFormat(predictionsFormat) + .setBigqueryDestination(bigqueryDestination) + .build(); + String modelName = ModelName.of(project, location, model).toString(); + BatchPredictionJob batchPredictionJob = + BatchPredictionJob.newBuilder() + .setDisplayName(displayName) + .setModel(modelName) + .setModelParameters(modelParameters) + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + // optional + .setGenerateExplanation(true) + .build(); + LocationName parent = LocationName.of(project, location); + BatchPredictionJob response = client.createBatchPredictionJob(parent, batchPredictionJob); + System.out.format("response: %s\n", response); + System.out.format("\tName: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_batch_prediction_job_bigquery_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobSample.java b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobSample.java new file mode 100644 index 000000000..cdac97ba4 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobSample.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_batch_prediction_job_sample] +import com.google.cloud.aiplatform.v1beta1.AcceleratorType; +import com.google.cloud.aiplatform.v1beta1.BatchDedicatedResources; +import com.google.cloud.aiplatform.v1beta1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1beta1.GcsDestination; +import com.google.cloud.aiplatform.v1beta1.GcsSource; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.MachineSpec; +import com.google.cloud.aiplatform.v1beta1.ModelName; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateBatchPredictionJobSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String modelName = "MODEL_NAME"; + String instancesFormat = "INSTANCES_FORMAT"; + String gcsSourceUri = "GCS_SOURCE_URI"; + String predictionsFormat = "PREDICTIONS_FORMAT"; + String gcsDestinationOutputUriPrefix = "GCS_DESTINATION_OUTPUT_URI_PREFIX"; + createBatchPredictionJobSample( + project, + displayName, + modelName, + instancesFormat, + gcsSourceUri, + predictionsFormat, + gcsDestinationOutputUriPrefix); + } + + static void createBatchPredictionJobSample( + String project, + String displayName, + String model, + String instancesFormat, + String gcsSourceUri, + String predictionsFormat, + String gcsDestinationOutputUriPrefix) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + + // Passing in an empty Value object for model parameters + JsonObject jsonModelParameters = new JsonObject(); + Value.Builder modelParametersBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonModelParameters.toString(), modelParametersBuilder); + Value modelParameters = modelParametersBuilder.build(); + + GcsSource gcsSource = GcsSource.newBuilder().addUris(gcsSourceUri).build(); + BatchPredictionJob.InputConfig inputConfig = + BatchPredictionJob.InputConfig.newBuilder() + .setInstancesFormat(instancesFormat) + .setGcsSource(gcsSource) + .build(); + GcsDestination gcsDestination = + GcsDestination.newBuilder().setOutputUriPrefix(gcsDestinationOutputUriPrefix).build(); + BatchPredictionJob.OutputConfig outputConfig = + BatchPredictionJob.OutputConfig.newBuilder() + .setPredictionsFormat(predictionsFormat) + .setGcsDestination(gcsDestination) + .build(); + MachineSpec machineSpec = + MachineSpec.newBuilder() + .setMachineType("n1-standard-2") + .setAcceleratorType(AcceleratorType.NVIDIA_TESLA_K80) + .setAcceleratorCount(1) + .build(); + BatchDedicatedResources dedicatedResources = + BatchDedicatedResources.newBuilder() + .setMachineSpec(machineSpec) + .setStartingReplicaCount(1) + .setMaxReplicaCount(1) + .build(); + String modelName = ModelName.of(project, location, model).toString(); + BatchPredictionJob batchPredictionJob = + BatchPredictionJob.newBuilder() + .setDisplayName(displayName) + .setModel(modelName) + .setModelParameters(modelParameters) + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + .setDedicatedResources(dedicatedResources) + .build(); + LocationName parent = LocationName.of(project, location); + BatchPredictionJob response = client.createBatchPredictionJob(parent, batchPredictionJob); + System.out.format("response: %s\n", response); + System.out.format("\tName: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_batch_prediction_job_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSample.java new file mode 100644 index 000000000..b255b625c --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSample.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_batch_prediction_job_video_action_recognition_sample] +import com.google.cloud.aiplatform.v1beta1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1beta1.GcsDestination; +import com.google.cloud.aiplatform.v1beta1.GcsSource; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.ModelName; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateBatchPredictionJobVideoActionRecognitionSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String model = "MODEL"; + String gcsSourceUri = "GCS_SOURCE_URI"; + String gcsDestinationOutputUriPrefix = "GCS_DESTINATION_OUTPUT_URI_PREFIX"; + createBatchPredictionJobVideoActionRecognitionSample( + project, displayName, model, gcsSourceUri, gcsDestinationOutputUriPrefix); + } + + static void createBatchPredictionJobVideoActionRecognitionSample( + String project, + String displayName, + String model, + String gcsSourceUri, + String gcsDestinationOutputUriPrefix) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + JsonObject jsonModelParameters = new JsonObject(); + jsonModelParameters.addProperty("confidenceThreshold", 0.5); + Value.Builder modelParametersBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonModelParameters.toString(), modelParametersBuilder); + Value modelParameters = modelParametersBuilder.build(); + GcsSource gcsSource = GcsSource.newBuilder().addUris(gcsSourceUri).build(); + BatchPredictionJob.InputConfig inputConfig = + BatchPredictionJob.InputConfig.newBuilder() + .setInstancesFormat("jsonl") + .setGcsSource(gcsSource) + .build(); + GcsDestination gcsDestination = + GcsDestination.newBuilder().setOutputUriPrefix(gcsDestinationOutputUriPrefix).build(); + BatchPredictionJob.OutputConfig outputConfig = + BatchPredictionJob.OutputConfig.newBuilder() + .setPredictionsFormat("jsonl") + .setGcsDestination(gcsDestination) + .build(); + + String modelName = ModelName.of(project, location, model).toString(); + + BatchPredictionJob batchPredictionJob = + BatchPredictionJob.newBuilder() + .setDisplayName(displayName) + .setModel(modelName) + .setModelParameters(modelParameters) + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + .build(); + LocationName parent = LocationName.of(project, location); + BatchPredictionJob response = client.createBatchPredictionJob(parent, batchPredictionJob); + System.out.format("response: %s\n", response); + System.out.format("\tName: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_batch_prediction_job_video_action_recognition_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobActiveLearningSample.java b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobActiveLearningSample.java new file mode 100644 index 000000000..d9f069e40 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobActiveLearningSample.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_data_labeling_job_active_learning_sample] +import com.google.cloud.aiplatform.v1beta1.ActiveLearningConfig; +import com.google.cloud.aiplatform.v1beta1.DataLabelingJob; +import com.google.cloud.aiplatform.v1beta1.DatasetName; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateDataLabelingJobActiveLearningSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String dataset = "DATASET"; + String instructionUri = "INSTRUCTION_URI"; + String inputsSchemaUri = "INPUTS_SCHEMA_URI"; + String annotationSpec = "ANNOTATION_SPEC"; + createDataLabelingJobActiveLearningSample( + project, displayName, dataset, instructionUri, inputsSchemaUri, annotationSpec); + } + + static void createDataLabelingJobActiveLearningSample( + String project, + String displayName, + String dataset, + String instructionUri, + String inputsSchemaUri, + String annotationSpec) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + JsonArray jsonAnnotationSpecs = new JsonArray(); + jsonAnnotationSpecs.add(annotationSpec); + JsonObject jsonInputs = new JsonObject(); + jsonInputs.add("annotation_specs", jsonAnnotationSpecs); + Value.Builder inputsBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonInputs.toString(), inputsBuilder); + Value inputs = inputsBuilder.build(); + ActiveLearningConfig activeLearningConfig = + ActiveLearningConfig.newBuilder().setMaxDataItemCount(1).build(); + + String datasetName = DatasetName.of(project, location, dataset).toString(); + + DataLabelingJob dataLabelingJob = + DataLabelingJob.newBuilder() + .setDisplayName(displayName) + .addDatasets(datasetName) + .setLabelerCount(1) + .setInstructionUri(instructionUri) + .setInputsSchemaUri(inputsSchemaUri) + .setInputs(inputs) + .putAnnotationLabels( + "aiplatform.googleapis.com/annotation_set_name", + "data_labeling_job_active_learning") + .setActiveLearningConfig(activeLearningConfig) + .build(); + LocationName parent = LocationName.of(project, location); + DataLabelingJob response = client.createDataLabelingJob(parent, dataLabelingJob); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_data_labeling_job_active_learning_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java index ce81ae6b4..5ea70a42f 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobImageSample.java @@ -72,7 +72,7 @@ static void createDataLabelingJobImage( .setInstructionUri(instructionUri) .setInputsSchemaUri( "gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/" - + "image_classification.yaml") + + "image_classification.yaml") .addDatasets(datasetName.toString()) .setInputs(annotationSpecValue) .putAnnotationLabels( diff --git a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSpecialistPoolSample.java b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSpecialistPoolSample.java new file mode 100644 index 000000000..04a3c4216 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobSpecialistPoolSample.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_data_labeling_job_specialist_pool_sample] +import com.google.cloud.aiplatform.v1beta1.DataLabelingJob; +import com.google.cloud.aiplatform.v1beta1.DatasetName; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.SpecialistPoolName; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateDataLabelingJobSpecialistPoolSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String dataset = "DATASET"; + String specialistPool = "SPECIALIST_POOL"; + String instructionUri = "INSTRUCTION_URI"; + String inputsSchemaUri = "INPUTS_SCHEMA_URI"; + String annotationSpec = "ANNOTATION_SPEC"; + createDataLabelingJobSpecialistPoolSample( + project, + displayName, + dataset, + specialistPool, + instructionUri, + inputsSchemaUri, + annotationSpec); + } + + static void createDataLabelingJobSpecialistPoolSample( + String project, + String displayName, + String dataset, + String specialistPool, + String instructionUri, + String inputsSchemaUri, + String annotationSpec) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + JsonArray jsonAnnotationSpecs = new JsonArray(); + jsonAnnotationSpecs.add(annotationSpec); + JsonObject jsonInputs = new JsonObject(); + jsonInputs.add("annotation_specs", jsonAnnotationSpecs); + Value.Builder inputsBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonInputs.toString(), inputsBuilder); + Value inputs = inputsBuilder.build(); + + String datasetName = DatasetName.of(project, location, dataset).toString(); + String specialistPoolName = SpecialistPoolName.of(project, location, specialistPool) + .toString(); + + DataLabelingJob dataLabelingJob = + DataLabelingJob.newBuilder() + .setDisplayName(displayName) + .addDatasets(datasetName) + .setLabelerCount(1) + .setInstructionUri(instructionUri) + .setInputsSchemaUri(inputsSchemaUri) + .setInputs(inputs) + .putAnnotationLabels( + "aiplatform.googleapis.com/annotation_set_name", + "data_labeling_job_specialist_pool") + .addSpecialistPools(specialistPoolName) + .build(); + LocationName parent = LocationName.of(project, location); + DataLabelingJob response = client.createDataLabelingJob(parent, dataLabelingJob); + System.out.format("response: %s\n", response); + } + } +} + +// [END aiplatform_create_data_labeling_job_specialist_pool_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java index 5722c335e..ae0e451ba 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateDataLabelingJobVideoSample.java @@ -72,7 +72,7 @@ static void createDataLabelingJobVideo( .setInstructionUri(instructionUri) .setInputsSchemaUri( "gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/" - + "video_classification.yaml") + + "video_classification.yaml") .addDatasets(datasetName.toString()) .setInputs(annotationSpecValue) .putAnnotationLabels( diff --git a/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java b/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java new file mode 100644 index 000000000..9d1937f3d --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java @@ -0,0 +1,174 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_hyperparameter_tuning_job_python_package_sample] +import com.google.cloud.aiplatform.v1beta1.AcceleratorType; +import com.google.cloud.aiplatform.v1beta1.CustomJobSpec; +import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.MachineSpec; +import com.google.cloud.aiplatform.v1beta1.PythonPackageSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec.ConditionalParameterSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec.DiscreteValueSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec.DoubleValueSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpec.ScaleType; +import com.google.cloud.aiplatform.v1beta1.WorkerPoolSpec; +import java.io.IOException; +import java.util.Arrays; + +public class CreateHyperparameterTuningJobPythonPackageSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String executorImageUri = "EXECUTOR_IMAGE_URI"; + String packageUri = "PACKAGE_URI"; + String pythonModule = "PYTHON_MODULE"; + createHyperparameterTuningJobPythonPackageSample( + project, displayName, executorImageUri, packageUri, pythonModule); + } + + static void createHyperparameterTuningJobPythonPackageSample( + String project, + String displayName, + String executorImageUri, + String packageUri, + String pythonModule) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + // study spec + MetricSpec metric = + MetricSpec.newBuilder().setMetricId("val_rmse").setGoal(GoalType.MINIMIZE).build(); + + // decay + DoubleValueSpec doubleValueSpec = + DoubleValueSpec.newBuilder().setMinValue(1e-07).setMaxValue(1).build(); + ParameterSpec parameterDecaySpec = + ParameterSpec.newBuilder() + .setParameterId("decay") + .setDoubleValueSpec(doubleValueSpec) + .setScaleType(ScaleType.UNIT_LINEAR_SCALE) + .build(); + Double[] decayValues = {32.0, 64.0}; + DiscreteValueCondition discreteValueDecay = + DiscreteValueCondition.newBuilder().addAllValues(Arrays.asList(decayValues)).build(); + ConditionalParameterSpec conditionalParameterDecay = + ConditionalParameterSpec.newBuilder() + .setParameterSpec(parameterDecaySpec) + .setParentDiscreteValues(discreteValueDecay) + .build(); + + // learning rate + ParameterSpec parameterLearningSpec = + ParameterSpec.newBuilder() + .setParameterId("learning_rate") + .setDoubleValueSpec(doubleValueSpec) // Use the same min/max as for decay + .setScaleType(ScaleType.UNIT_LINEAR_SCALE) + .build(); + + Double[] learningRateValues = {4.0, 8.0, 16.0}; + DiscreteValueCondition discreteValueLearning = + DiscreteValueCondition.newBuilder() + .addAllValues(Arrays.asList(learningRateValues)) + .build(); + ConditionalParameterSpec conditionalParameterLearning = + ConditionalParameterSpec.newBuilder() + .setParameterSpec(parameterLearningSpec) + .setParentDiscreteValues(discreteValueLearning) + .build(); + + // batch size + Double[] batchSizeValues = {4.0, 8.0, 16.0, 32.0, 64.0, 128.0}; + + DiscreteValueSpec discreteValueSpec = + DiscreteValueSpec.newBuilder().addAllValues(Arrays.asList(batchSizeValues)).build(); + ParameterSpec parameter = + ParameterSpec.newBuilder() + .setParameterId("batch_size") + .setDiscreteValueSpec(discreteValueSpec) + .setScaleType(ScaleType.UNIT_LINEAR_SCALE) + .addConditionalParameterSpecs(conditionalParameterDecay) + .addConditionalParameterSpecs(conditionalParameterLearning) + .build(); + + // trial_job_spec + MachineSpec machineSpec = + MachineSpec.newBuilder() + .setMachineType("n1-standard-4") + .setAcceleratorType(AcceleratorType.NVIDIA_TESLA_K80) + .setAcceleratorCount(1) + .build(); + + PythonPackageSpec pythonPackageSpec = + PythonPackageSpec.newBuilder() + .setExecutorImageUri(executorImageUri) + .addPackageUris(packageUri) + .setPythonModule(pythonModule) + .build(); + + WorkerPoolSpec workerPoolSpec = + WorkerPoolSpec.newBuilder() + .setMachineSpec(machineSpec) + .setReplicaCount(1) + .setPythonPackageSpec(pythonPackageSpec) + .build(); + + StudySpec studySpec = + StudySpec.newBuilder() + .addMetrics(metric) + .addParameters(parameter) + .setAlgorithm(StudySpec.Algorithm.RANDOM_SEARCH) + .build(); + CustomJobSpec trialJobSpec = + CustomJobSpec.newBuilder().addWorkerPoolSpecs(workerPoolSpec).build(); + // hyperparameter_tuning_job + HyperparameterTuningJob hyperparameterTuningJob = + HyperparameterTuningJob.newBuilder() + .setDisplayName(displayName) + .setMaxTrialCount(4) + .setParallelTrialCount(2) + .setStudySpec(studySpec) + .setTrialJobSpec(trialJobSpec) + .build(); + LocationName parent = LocationName.of(project, location); + HyperparameterTuningJob response = + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_hyperparameter_tuning_job_python_package_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java b/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java new file mode 100644 index 000000000..37e66d512 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_hyperparameter_tuning_job_sample] +import com.google.cloud.aiplatform.v1beta1.AcceleratorType; +import com.google.cloud.aiplatform.v1beta1.ContainerSpec; +import com.google.cloud.aiplatform.v1beta1.CustomJobSpec; +import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.MachineSpec; +import com.google.cloud.aiplatform.v1beta1.StudySpec; +import com.google.cloud.aiplatform.v1beta1.WorkerPoolSpec; +import java.io.IOException; + +public class CreateHyperparameterTuningJobSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String containerImageUri = "CONTAINER_IMAGE_URI"; + createHyperparameterTuningJobSample(project, displayName, containerImageUri); + } + + static void createHyperparameterTuningJobSample( + String project, String displayName, String containerImageUri) throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + StudySpec.MetricSpec metric0 = + StudySpec.MetricSpec.newBuilder() + .setMetricId("accuracy") + .setGoal(StudySpec.MetricSpec.GoalType.MAXIMIZE) + .build(); + StudySpec.ParameterSpec.DoubleValueSpec doubleValueSpec = + StudySpec.ParameterSpec.DoubleValueSpec.newBuilder() + .setMinValue(0.001) + .setMaxValue(0.1) + .build(); + StudySpec.ParameterSpec parameter0 = + StudySpec.ParameterSpec.newBuilder() + // Learning rate. + .setParameterId("lr") + .setDoubleValueSpec(doubleValueSpec) + .build(); + StudySpec studySpec = + StudySpec.newBuilder().addMetrics(metric0).addParameters(parameter0).build(); + MachineSpec machineSpec = + MachineSpec.newBuilder() + .setMachineType("n1-standard-4") + .setAcceleratorType(AcceleratorType.NVIDIA_TESLA_K80) + .setAcceleratorCount(1) + .build(); + ContainerSpec containerSpec = + ContainerSpec.newBuilder().setImageUri(containerImageUri).build(); + WorkerPoolSpec workerPoolSpec0 = + WorkerPoolSpec.newBuilder() + .setMachineSpec(machineSpec) + .setReplicaCount(1) + .setContainerSpec(containerSpec) + .build(); + CustomJobSpec trialJobSpec = + CustomJobSpec.newBuilder().addWorkerPoolSpecs(workerPoolSpec0).build(); + HyperparameterTuningJob hyperparameterTuningJob = + HyperparameterTuningJob.newBuilder() + .setDisplayName(displayName) + .setMaxTrialCount(2) + .setParallelTrialCount(1) + .setMaxFailedTrialCount(1) + .setStudySpec(studySpec) + .setTrialJobSpec(trialJobSpec) + .build(); + LocationName parent = LocationName.of(project, location); + HyperparameterTuningJob response = + client.createHyperparameterTuningJob(parent, hyperparameterTuningJob); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_hyperparameter_tuning_job_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomJobSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomJobSample.java new file mode 100644 index 000000000..7b40d0e8d --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomJobSample.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +// [START aiplatform_create_training_pipeline_custom_job_sample] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.Model; +import com.google.cloud.aiplatform.v1beta1.ModelContainerSpec; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceSettings; +import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateTrainingPipelineCustomJobSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String modelDisplayName = "MODEL_DISPLAY_NAME"; + String containerImageUri = "CONTAINER_IMAGE_URI"; + String baseOutputDirectoryPrefix = "BASE_OUTPUT_DIRECTORY_PREFIX"; + createTrainingPipelineCustomJobSample( + project, displayName, modelDisplayName, containerImageUri, baseOutputDirectoryPrefix); + } + + static void createTrainingPipelineCustomJobSample( + String project, + String displayName, + String modelDisplayName, + String containerImageUri, + String baseOutputDirectoryPrefix) + throws IOException { + PipelineServiceSettings settings = + PipelineServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (PipelineServiceClient client = PipelineServiceClient.create(settings)) { + JsonObject jsonMachineSpec = new JsonObject(); + jsonMachineSpec.addProperty("machineType", "n1-standard-4"); + + JsonArray jsonArgs = new JsonArray(); + jsonArgs.add("--model_dir=$(AIP_MODEL_DIR)"); + + // A working docker image can be found at + // gs://cloud-samples-data/ai-platform/mnist_tfrecord/custom_job + JsonObject jsonContainerSpec = new JsonObject(); + jsonContainerSpec.addProperty("imageUri", containerImageUri); + jsonContainerSpec.add("args", jsonArgs); + + JsonObject jsonJsonWorkerPoolSpec0 = new JsonObject(); + jsonJsonWorkerPoolSpec0.addProperty("replicaCount", 1); + jsonJsonWorkerPoolSpec0.add("machineSpec", jsonMachineSpec); + jsonJsonWorkerPoolSpec0.add("containerSpec", jsonContainerSpec); + + JsonArray jsonWorkerPoolSpecs = new JsonArray(); + jsonWorkerPoolSpecs.add(jsonJsonWorkerPoolSpec0); + + JsonObject jsonBaseOutputDirectory = new JsonObject(); + // The GCS location for outputs must be accessible by the project's AI Platform + // service account. + jsonBaseOutputDirectory.addProperty("output_uri_prefix", baseOutputDirectoryPrefix); + + JsonObject jsonTrainingTaskInputs = new JsonObject(); + jsonTrainingTaskInputs.add("workerPoolSpecs", jsonWorkerPoolSpecs); + jsonTrainingTaskInputs.add("baseOutputDirectory", jsonBaseOutputDirectory); + + Value.Builder trainingTaskInputsBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonTrainingTaskInputs.toString(), trainingTaskInputsBuilder); + Value trainingTaskInputs = trainingTaskInputsBuilder.build(); + String trainingTaskDefinition = + "gs://google-cloud-aiplatform/schema/trainingjob/definition/custom_task_1.0.0.yaml"; + String imageUri = "gcr.io/cloud-aiplatform/prediction/tf-cpu.1-15:latest"; + ModelContainerSpec containerSpec = + ModelContainerSpec.newBuilder().setImageUri(imageUri).build(); + Model modelToUpload = + Model.newBuilder() + .setDisplayName(modelDisplayName) + .setContainerSpec(containerSpec) + .build(); + TrainingPipeline trainingPipeline = + TrainingPipeline.newBuilder() + .setDisplayName(displayName) + .setTrainingTaskDefinition(trainingTaskDefinition) + .setTrainingTaskInputs(trainingTaskInputs) + .setModelToUpload(modelToUpload) + .build(); + LocationName parent = LocationName.of(project, location); + TrainingPipeline response = client.createTrainingPipeline(parent, trainingPipeline); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_training_pipeline_custom_job_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSample.java new file mode 100644 index 000000000..739d15cf8 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSample.java @@ -0,0 +1,145 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_create_training_pipeline_custom_training_managed_dataset_sample] +import com.google.cloud.aiplatform.v1beta1.GcsDestination; +import com.google.cloud.aiplatform.v1beta1.InputDataConfig; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.Model; +import com.google.cloud.aiplatform.v1beta1.ModelContainerSpec; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceSettings; +import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateTrainingPipelineCustomTrainingManagedDatasetSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String modelDisplayName = "MODEL_DISPLAY_NAME"; + String datasetId = "DATASET_ID"; + String annotationSchemaUri = "ANNOTATION_SCHEMA_URI"; + String trainingContainerSpecImageUri = "TRAINING_CONTAINER_SPEC_IMAGE_URI"; + String modelContainerSpecImageUri = "MODEL_CONTAINER_SPEC_IMAGE_URI"; + String baseOutputUriPrefix = "BASE_OUTPUT_URI_PREFIX"; + createTrainingPipelineCustomTrainingManagedDatasetSample( + project, + displayName, + modelDisplayName, + datasetId, + annotationSchemaUri, + trainingContainerSpecImageUri, + modelContainerSpecImageUri, + baseOutputUriPrefix); + } + + static void createTrainingPipelineCustomTrainingManagedDatasetSample( + String project, + String displayName, + String modelDisplayName, + String datasetId, + String annotationSchemaUri, + String trainingContainerSpecImageUri, + String modelContainerSpecImageUri, + String baseOutputUriPrefix) + throws IOException { + PipelineServiceSettings settings = + PipelineServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (PipelineServiceClient client = PipelineServiceClient.create(settings)) { + JsonArray jsonArgs = new JsonArray(); + jsonArgs.add("--model-dir=$(AIP_MODEL_DIR)"); + // training_task_inputs + JsonObject jsonTrainingContainerSpec = new JsonObject(); + jsonTrainingContainerSpec.addProperty("imageUri", trainingContainerSpecImageUri); + // AIP_MODEL_DIR is set by the service according to baseOutputDirectory. + jsonTrainingContainerSpec.add("args", jsonArgs); + + JsonObject jsonMachineSpec = new JsonObject(); + jsonMachineSpec.addProperty("machineType", "n1-standard-8"); + + JsonObject jsonTrainingWorkerPoolSpec = new JsonObject(); + jsonTrainingWorkerPoolSpec.addProperty("replicaCount", 1); + jsonTrainingWorkerPoolSpec.add("machineSpec", jsonMachineSpec); + jsonTrainingWorkerPoolSpec.add("containerSpec", jsonTrainingContainerSpec); + + JsonArray jsonWorkerPoolSpecs = new JsonArray(); + jsonWorkerPoolSpecs.add(jsonTrainingWorkerPoolSpec); + + JsonObject jsonBaseOutputDirectory = new JsonObject(); + jsonBaseOutputDirectory.addProperty("outputUriPrefix", baseOutputUriPrefix); + + JsonObject jsonTrainingTaskInputs = new JsonObject(); + jsonTrainingTaskInputs.add("workerPoolSpecs", jsonWorkerPoolSpecs); + jsonTrainingTaskInputs.add("baseOutputDirectory", jsonBaseOutputDirectory); + + Value.Builder trainingTaskInputsBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonTrainingTaskInputs.toString(), trainingTaskInputsBuilder); + Value trainingTaskInputs = trainingTaskInputsBuilder.build(); + // model_to_upload + ModelContainerSpec modelContainerSpec = + ModelContainerSpec.newBuilder().setImageUri(modelContainerSpecImageUri).build(); + Model model = + Model.newBuilder() + .setDisplayName(modelDisplayName) + .setContainerSpec(modelContainerSpec) + .build(); + GcsDestination gcsDestination = + GcsDestination.newBuilder().setOutputUriPrefix(baseOutputUriPrefix).build(); + + // input_data_config + InputDataConfig inputDataConfig = + InputDataConfig.newBuilder() + .setDatasetId(datasetId) + .setAnnotationSchemaUri(annotationSchemaUri) + .setGcsDestination(gcsDestination) + .build(); + + // training_task_definition + String customTaskDefinition = + "gs://google-cloud-aiplatform/schema/trainingjob/definition/custom_task_1.0.0.yaml"; + + TrainingPipeline trainingPipeline = + TrainingPipeline.newBuilder() + .setDisplayName(displayName) + .setInputDataConfig(inputDataConfig) + .setTrainingTaskDefinition(customTaskDefinition) + .setTrainingTaskInputs(trainingTaskInputs) + .setModelToUpload(model) + .build(); + LocationName parent = LocationName.of(project, location); + TrainingPipeline response = client.createTrainingPipeline(parent, trainingPipeline); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_training_pipeline_custom_training_managed_dataset_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java index 7327cba9b..445707253 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageClassificationSample.java @@ -17,7 +17,7 @@ package aiplatform; // [START aiplatform_create_training_pipeline_image_classification_sample] - +import com.google.cloud.aiplatform.util.ValueConverter; import com.google.cloud.aiplatform.v1beta1.DeployedModelRef; import com.google.cloud.aiplatform.v1beta1.EnvVar; import com.google.cloud.aiplatform.v1beta1.ExplanationMetadata; @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; -import com.google.protobuf.Value; -import com.google.protobuf.util.JsonFormat; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineImageClassificationSample { @@ -73,14 +71,16 @@ static void createTrainingPipelineImageClassificationSample( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_image_classification_1.0.0.yaml"; + + "automl_image_classification_1.0.0.yaml"; LocationName locationName = LocationName.of(project, location); - String jsonString = - "{\"multiLabel\": false, \"modelType\": \"CLOUD\", \"budgetMilliNodeHours\": 8000," - + " \"disableEarlyStopping\": false}"; - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + AutoMlImageClassificationInputs autoMlImageClassificationInputs = + AutoMlImageClassificationInputs.newBuilder() + .setModelType(ModelType.CLOUD) + .setMultiLabel(false) + .setBudgetMilliNodeHours(8000) + .setDisableEarlyStopping(false) + .build(); InputDataConfig trainingInputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); @@ -89,7 +89,7 @@ static void createTrainingPipelineImageClassificationSample( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(autoMlImageClassificationInputs)) .setInputDataConfig(trainingInputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java index 636ab0224..d6b2af9ab 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineImageObjectDetectionSample { @@ -73,7 +71,7 @@ static void createTrainingPipelineImageObjectDetectionSample( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_image_object_detection_1.0.0.yaml"; + + "automl_image_object_detection_1.0.0.yaml"; LocationName locationName = LocationName.of(project, location); String jsonString = diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java index 5c310bfea..2dcb6e88c 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineSample.java @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineSample { diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java index de54c0a0a..92ebb6ada 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java @@ -37,12 +37,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineTabularClassificationSample { diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java index ca24862ca..0043fdf52 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java @@ -37,12 +37,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineTabularRegressionSample { diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java index c67e49a05..b5335a4c7 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineTextClassificationSample { @@ -74,7 +72,7 @@ static void createTrainingPipelineTextClassificationSample( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_text_classification_1.0.0.yaml"; + + "automl_text_classification_1.0.0.yaml"; String jsonString = "{\"multiLabel\": false}"; LocationName locationName = LocationName.of(project, location); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java index 3aef27086..9d83a4d1e 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineTextEntityExtractionSample { @@ -74,7 +72,7 @@ static void createTrainingPipelineTextEntityExtractionSample( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_text_extraction_1.0.0.yaml"; + + "automl_text_extraction_1.0.0.yaml"; String jsonString = "{}"; LocationName locationName = LocationName.of(project, location); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java index a6139405d..f9c656ad0 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java @@ -38,12 +38,10 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineTextSentimentAnalysisSample { @@ -74,7 +72,7 @@ static void createTrainingPipelineTextSentimentAnalysisSample( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_text_sentiment_1.0.0.yaml"; + + "automl_text_sentiment_1.0.0.yaml"; // Sentiment max must be between 1 and 10 inclusive. // Higher value means positive sentiment. diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java new file mode 100644 index 000000000..70d03788e --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +// [START aiplatform_create_training_pipeline_video_action_recognition_sample] +import com.google.cloud.aiplatform.v1beta1.InputDataConfig; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.Model; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceSettings; +import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.gson.JsonObject; +import com.google.protobuf.Value; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; + +public class CreateTrainingPipelineVideoActionRecognitionSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String displayName = "DISPLAY_NAME"; + String datasetId = "DATASET_ID"; + String modelDisplayName = "MODEL_DISPLAY_NAME"; + String modelType = "MODEL_TYPE"; + createTrainingPipelineVideoActionRecognitionSample( + project, displayName, datasetId, modelDisplayName, modelType); + } + + static void createTrainingPipelineVideoActionRecognitionSample( + String project, + String displayName, + String datasetId, + String modelDisplayName, + String modelType) + throws IOException { + PipelineServiceSettings settings = + PipelineServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (PipelineServiceClient client = PipelineServiceClient.create(settings)) { + JsonObject jsonTrainingTaskInputs = new JsonObject(); + jsonTrainingTaskInputs.addProperty("modelType", modelType); + Value.Builder trainingTaskInputsBuilder = Value.newBuilder(); + JsonFormat.parser().merge(jsonTrainingTaskInputs.toString(), trainingTaskInputsBuilder); + Value trainingTaskInputs = trainingTaskInputsBuilder.build(); + InputDataConfig inputDataConfig = + InputDataConfig.newBuilder().setDatasetId(datasetId).build(); + Model modelToUpload = Model.newBuilder().setDisplayName(modelDisplayName).build(); + TrainingPipeline trainingPipeline = + TrainingPipeline.newBuilder() + .setDisplayName(displayName) + .setTrainingTaskDefinition( + "gs://google-cloud-aiplatform/schema/trainingjob/definition/" + + "automl_video_action_recognition_1.0.0.yaml") + .setTrainingTaskInputs(trainingTaskInputs) + .setInputDataConfig(inputDataConfig) + .setModelToUpload(modelToUpload) + .build(); + LocationName parent = LocationName.of(project, location); + TrainingPipeline response = client.createTrainingPipeline(parent, trainingPipeline); + System.out.format("response: %s\n", response); + System.out.format("Name: %s\n", response.getName()); + } + } +} + +// [END aiplatform_create_training_pipeline_video_action_recognition_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java index 383e56954..eacbc5123 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java @@ -28,11 +28,9 @@ import com.google.cloud.aiplatform.v1beta1.PredefinedSplit; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineVideoClassificationSample { @@ -67,7 +65,7 @@ static void createTrainingPipelineVideoClassification( LocationName locationName = LocationName.of(project, location); String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_video_classification_1.0.0.yaml"; + + "automl_video_classification_1.0.0.yaml"; InputDataConfig inputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java index d49fcff96..a8e5ee149 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java @@ -28,12 +28,10 @@ import com.google.cloud.aiplatform.v1beta1.PredefinedSplit; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; -import com.google.protobuf.Any; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; -import java.util.List; public class CreateTrainingPipelineVideoObjectTrackingSample { @@ -66,7 +64,7 @@ static void createTrainingPipelineVideoObjectTracking( String location = "us-central1"; String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_video_object_tracking_1.0.0.yaml"; + + "automl_video_object_tracking_1.0.0.yaml"; LocationName locationName = LocationName.of(project, location); String jsonString = "{\"modelType\": \"CLOUD\"}"; diff --git a/samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java b/samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java index a9989b564..39ad52d0f 100644 --- a/samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java +++ b/samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java @@ -59,7 +59,7 @@ static void deleteDatasetSample(String project, String datasetId) System.out.format("Operation name: %s\n", operationFuture.getInitialFuture().get().getName()); System.out.println("Waiting for operation to finish..."); operationFuture.get(300, TimeUnit.SECONDS); - + System.out.format("Deleted Dataset."); } } diff --git a/samples/snippets/src/main/java/aiplatform/DeployModelCustomTrainedModelSample.java b/samples/snippets/src/main/java/aiplatform/DeployModelCustomTrainedModelSample.java new file mode 100644 index 000000000..471961b69 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/DeployModelCustomTrainedModelSample.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +// [START aiplatform_deploy_model_custom_trained_model_sample] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DedicatedResources; +import com.google.cloud.aiplatform.v1beta1.DeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeployModelResponse; +import com.google.cloud.aiplatform.v1beta1.DeployedModel; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.EndpointServiceClient; +import com.google.cloud.aiplatform.v1beta1.EndpointServiceSettings; +import com.google.cloud.aiplatform.v1beta1.MachineSpec; +import com.google.cloud.aiplatform.v1beta1.ModelName; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ExecutionException; + +public class DeployModelCustomTrainedModelSample { + + public static void main(String[] args) + throws IOException, ExecutionException, InterruptedException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String endpointId = "ENDPOINT_ID"; + String modelName = "MODEL_NAME"; + String deployedModelDisplayName = "DEPLOYED_MODEL_DISPLAY_NAME"; + deployModelCustomTrainedModelSample(project, endpointId, modelName, deployedModelDisplayName); + } + + static void deployModelCustomTrainedModelSample( + String project, String endpointId, String model, String deployedModelDisplayName) + throws IOException, ExecutionException, InterruptedException { + EndpointServiceSettings settings = + EndpointServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (EndpointServiceClient client = EndpointServiceClient.create(settings)) { + MachineSpec machineSpec = MachineSpec.newBuilder().setMachineType("n1-standard-2").build(); + DedicatedResources dedicatedResources = + DedicatedResources.newBuilder().setMinReplicaCount(1).setMachineSpec(machineSpec).build(); + + String modelName = ModelName.of(project, location, model).toString(); + DeployedModel deployedModel = + DeployedModel.newBuilder() + .setModel(modelName) + .setDisplayName(deployedModelDisplayName) + // `dedicated_resources` must be used for non-AutoML models + .setDedicatedResources(dedicatedResources) + .build(); + // key '0' assigns traffic for the newly deployed model + // Traffic percentage values must add up to 100 + // Leave dictionary empty if endpoint should not accept any traffic + Map trafficSplit = new HashMap<>(); + trafficSplit.put("0", 100); + EndpointName endpoint = EndpointName.of(project, location, endpointId); + OperationFuture response = + client.deployModelAsync(endpoint, deployedModel, trafficSplit); + + // You can use OperationFuture.getInitialFuture to get a future representing the initial + // response to the request, which contains information while the operation is in progress. + System.out.format("Operation name: %s\n", response.getInitialFuture().get().getName()); + + // OperationFuture.get() will block until the operation is finished. + DeployModelResponse deployModelResponse = response.get(); + System.out.format("deployModelResponse: %s\n", deployModelResponse); + } + } +} + +// [END aiplatform_deploy_model_custom_trained_model_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java new file mode 100644 index 000000000..1d70cd0d8 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +// [START aiplatform_export_model_video_action_recognition_sample] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.ExportModelOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ExportModelRequest; +import com.google.cloud.aiplatform.v1beta1.ExportModelResponse; +import com.google.cloud.aiplatform.v1beta1.GcsDestination; +import com.google.cloud.aiplatform.v1beta1.ModelName; +import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; +import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import java.io.IOException; +import java.util.concurrent.ExecutionException; + +public class ExportModelVideoActionRecognitionSample { + + public static void main(String[] args) + throws IOException, ExecutionException, InterruptedException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String modelId = "MODEL_ID"; + String gcsDestinationOutputUriPrefix = "GCS_DESTINATION_OUTPUT_URI_PREFIX"; + String exportFormat = "EXPORT_FORMAT"; + exportModelVideoActionRecognitionSample( + project, modelId, gcsDestinationOutputUriPrefix, exportFormat); + } + + static void exportModelVideoActionRecognitionSample( + String project, String modelId, String gcsDestinationOutputUriPrefix, String exportFormat) + throws IOException, ExecutionException, InterruptedException { + ModelServiceSettings settings = + ModelServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (ModelServiceClient client = ModelServiceClient.create(settings)) { + GcsDestination gcsDestination = + GcsDestination.newBuilder().setOutputUriPrefix(gcsDestinationOutputUriPrefix).build(); + ExportModelRequest.OutputConfig outputConfig = + ExportModelRequest.OutputConfig.newBuilder() + .setArtifactDestination(gcsDestination) + .setExportFormatId(exportFormat) + .build(); + ModelName name = ModelName.of(project, location, modelId); + OperationFuture response = + client.exportModelAsync(name, outputConfig); + + // You can use OperationFuture.getInitialFuture to get a future representing the initial + // response to the request, which contains information while the operation is in progress. + System.out.format("Operation name: %s\n", response.getInitialFuture().get().getName()); + + // OperationFuture.get() will block until the operation is finished. + ExportModelResponse exportModelResponse = response.get(); + System.out.format("exportModelResponse: %s\n", exportModelResponse); + } + } +} + +// [END aiplatform_export_model_video_action_recognition_sample] diff --git a/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java b/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java new file mode 100644 index 000000000..b4d100c3c --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_get_hyperparameter_tuning_job_sample] +import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJobName; +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import java.io.IOException; + +public class GetHyperparameterTuningJobSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String hyperparameterTuningJobId = "HYPERPARAMETER_TUNING_JOB_ID"; + getHyperparameterTuningJobSample(project, hyperparameterTuningJobId); + } + + static void getHyperparameterTuningJobSample(String project, String hyperparameterTuningJobId) + throws IOException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (JobServiceClient client = JobServiceClient.create(settings)) { + HyperparameterTuningJobName name = + HyperparameterTuningJobName.of(project, location, hyperparameterTuningJobId); + HyperparameterTuningJob response = client.getHyperparameterTuningJob(name); + System.out.format("response: %s\n", response); + } + } +} + +// [END aiplatform_get_hyperparameter_tuning_job_sample] diff --git a/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java new file mode 100644 index 000000000..2685e23f1 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_get_model_evaluation_video_action_recognition_sample] +import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; +import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; +import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import java.io.IOException; + +public class GetModelEvaluationVideoActionRecognitionSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String modelId = "MODEL_ID"; + String evaluationId = "EVALUATION_ID"; + getModelEvaluationVideoActionRecognitionSample(project, modelId, evaluationId); + } + + static void getModelEvaluationVideoActionRecognitionSample( + String project, String modelId, String evaluationId) throws IOException { + ModelServiceSettings settings = + ModelServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (ModelServiceClient client = ModelServiceClient.create(settings)) { + ModelEvaluationName name = ModelEvaluationName.of(project, location, modelId, evaluationId); + ModelEvaluation response = client.getModelEvaluation(name); + System.out.format("response: %s\n", response); + } + } +} + +// [END aiplatform_get_model_evaluation_video_action_recognition_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataImageClassificationSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataImageClassificationSample.java index 04beb8c54..7bc46c447 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataImageClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataImageClassificationSample.java @@ -61,7 +61,7 @@ static void importDataImageClassificationSample( String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "image_classification_single_label_io_format_1.0.0.yaml"; + + "image_classification_single_label_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -81,8 +81,8 @@ static void importDataImageClassificationSample( System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Image Classification Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Image Classification Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataImageObjectDetectionSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataImageObjectDetectionSample.java index ae17cfd3a..947b3f232 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataImageObjectDetectionSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataImageObjectDetectionSample.java @@ -61,7 +61,7 @@ static void importDataImageObjectDetectionSample( String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "image_bounding_box_io_format_1.0.0.yaml"; + + "image_bounding_box_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); DatasetName datasetName = DatasetName.of(project, location, datasetId); @@ -80,8 +80,8 @@ static void importDataImageObjectDetectionSample( System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Image Object Detection Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Image Object Detection Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java index cf08bd38a..8c285a1b6 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataTextClassificationSingleLabelSample.java @@ -62,7 +62,7 @@ static void importDataTextClassificationSingleLabelSample( String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "text_classification_single_label_io_format_1.0.0.yaml"; + + "text_classification_single_label_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -82,8 +82,8 @@ static void importDataTextClassificationSingleLabelSample( System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Text Classification Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Text Classification Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java index 6bd5c4f02..be53db261 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataTextEntityExtractionSample.java @@ -61,7 +61,7 @@ static void importDataTextEntityExtractionSample( String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "text_extraction_io_format_1.0.0.yaml"; + + "text_extraction_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -81,8 +81,8 @@ static void importDataTextEntityExtractionSample( System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Text Entity Extraction Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Text Entity Extraction Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java index e17506783..4634d6f64 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataTextSentimentAnalysisSample.java @@ -62,7 +62,7 @@ static void importDataTextSentimentAnalysisSample( String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "text_sentiment_io_format_1.0.0.yaml"; + + "text_sentiment_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -82,8 +82,8 @@ static void importDataTextSentimentAnalysisSample( System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Text Sentiment Analysis Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Text Sentiment Analysis Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java new file mode 100644 index 000000000..ac182ecbc --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +// [START aiplatform_import_data_video_action_recognition_sample] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DatasetName; +import com.google.cloud.aiplatform.v1beta1.DatasetServiceClient; +import com.google.cloud.aiplatform.v1beta1.DatasetServiceSettings; +import com.google.cloud.aiplatform.v1beta1.GcsSource; +import com.google.cloud.aiplatform.v1beta1.ImportDataConfig; +import com.google.cloud.aiplatform.v1beta1.ImportDataOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ImportDataResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; + +public class ImportDataVideoActionRecognitionSample { + + public static void main(String[] args) + throws IOException, ExecutionException, InterruptedException { + // TODO(developer): Replace these variables before running the sample. + String project = "PROJECT"; + String datasetId = "DATASET_ID"; + String gcsSourceUri = "GCS_SOURCE_URI"; + importDataVideoActionRecognitionSample(project, datasetId, gcsSourceUri); + } + + static void importDataVideoActionRecognitionSample( + String project, String datasetId, String gcsSourceUri) + throws IOException, ExecutionException, InterruptedException { + DatasetServiceSettings settings = + DatasetServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + String location = "us-central1"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DatasetServiceClient client = DatasetServiceClient.create(settings)) { + GcsSource gcsSource = GcsSource.newBuilder().addUris(gcsSourceUri).build(); + ImportDataConfig importConfig0 = + ImportDataConfig.newBuilder() + .setGcsSource(gcsSource) + .setImportSchemaUri( + "gs://google-cloud-aiplatform/schema/dataset/ioformat/" + + "video_action_recognition_io_format_1.0.0.yaml") + .build(); + List importConfigs = new ArrayList<>(); + importConfigs.add(importConfig0); + DatasetName name = DatasetName.of(project, location, datasetId); + OperationFuture response = + client.importDataAsync(name, importConfigs); + + // You can use OperationFuture.getInitialFuture to get a future representing the initial + // response to the request, which contains information while the operation is in progress. + System.out.format("Operation name: %s\n", response.getInitialFuture().get().getName()); + + // OperationFuture.get() will block until the operation is finished. + ImportDataResponse importDataResponse = response.get(); + System.out.format("importDataResponse: %s\n", importDataResponse); + } + } +} + +// [END aiplatform_import_data_video_action_recognition_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java index 4bf2c37f3..10a7b673e 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java @@ -60,7 +60,7 @@ static void importDataVideoClassification(String gcsSourceUri, String project, S String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "video_classification_io_format_1.0.0.yaml"; + + "video_classification_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -81,8 +81,7 @@ static void importDataVideoClassification(String gcsSourceUri, String project, S ImportDataResponse importDataResponse = importDataResponseFuture.get(1800, TimeUnit.SECONDS); System.out.format( - "Import Data Video Classification Response: %s\n", - importDataResponse.toString()); + "Import Data Video Classification Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java b/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java index f8a07d914..87807c193 100644 --- a/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java +++ b/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java @@ -59,7 +59,7 @@ static void importDataVideObjectTracking(String gcsSourceUri, String project, St String location = "us-central1"; String importSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/ioformat/" - + "video_object_tracking_io_format_1.0.0.yaml"; + + "video_object_tracking_io_format_1.0.0.yaml"; GcsSource.Builder gcsSource = GcsSource.newBuilder(); gcsSource.addUris(gcsSourceUri); @@ -78,8 +78,8 @@ static void importDataVideObjectTracking(String gcsSourceUri, String project, St System.out.println("Waiting for operation to finish..."); ImportDataResponse importDataResponse = importDataResponseFuture.get(300, TimeUnit.SECONDS); - System.out.format("Import Data Video Object Tracking Response: %s\n", - importDataResponse.toString()); + System.out.format( + "Import Data Video Object Tracking Response: %s\n", importDataResponse.toString()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java b/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java index b63a91400..bfe6ba9b1 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java @@ -19,12 +19,15 @@ // [START aiplatform_predict_image_classification_sample] import com.google.api.client.util.Base64; +import com.google.cloud.aiplatform.util.ValueConverter; import com.google.cloud.aiplatform.v1beta1.EndpointName; import com.google.cloud.aiplatform.v1beta1.PredictResponse; import com.google.cloud.aiplatform.v1beta1.PredictionServiceClient; import com.google.cloud.aiplatform.v1beta1.PredictionServiceSettings; +import com.google.cloud.aiplatform.v1beta1.schema.predict.instance.ImageClassificationPredictionInstance; +import com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageClassificationPredictionParams; +import com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult; import com.google.protobuf.Value; -import com.google.protobuf.util.JsonFormat; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -60,23 +63,42 @@ static void predictImageClassification(String project, String fileName, String e byte[] contents = Base64.encodeBase64(Files.readAllBytes(Paths.get(fileName))); String content = new String(contents, StandardCharsets.UTF_8); - Value parameter = Value.newBuilder().setNumberValue(0).setNumberValue(5).build(); - - String contentDict = "{\"content\": \"" + content + "\"}"; - Value.Builder instance = Value.newBuilder(); - JsonFormat.parser().merge(contentDict, instance); + ImageClassificationPredictionInstance predictionInstance = + ImageClassificationPredictionInstance.newBuilder() + .setContent(content) + .build(); List instances = new ArrayList<>(); - instances.add(instance.build()); + instances.add(ValueConverter.toValue(predictionInstance)); + + ImageClassificationPredictionParams predictionParams = + ImageClassificationPredictionParams.newBuilder() + .setConfidenceThreshold((float) 0.5) + .setMaxPredictions(5) + .build(); PredictResponse predictResponse = - predictionServiceClient.predict(endpointName, instances, parameter); + predictionServiceClient.predict(endpointName, instances, + ValueConverter.toValue(predictionParams)); System.out.println("Predict Image Classification Response"); System.out.format("\tDeployed Model Id: %s\n", predictResponse.getDeployedModelId()); System.out.println("Predictions"); for (Value prediction : predictResponse.getPredictionsList()) { - System.out.format("\tPrediction: %s\n", prediction); + + ClassificationPredictionResult.Builder resultBuilder = + ClassificationPredictionResult.newBuilder(); + // Display names and confidences values correspond to + // IDs in the ID list. + ClassificationPredictionResult result = + (ClassificationPredictionResult) ValueConverter.fromValue(resultBuilder, prediction); + int counter = 0; + for (Long id : result.getIdsList()) { + System.out.printf("Label ID: %d\n", id); + System.out.printf("Label: %s\n", result.getDisplayNames(counter)); + System.out.printf("Confidence: %.4f\n", result.getConfidences(counter)); + counter++; + } } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java b/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java index 84e323f59..75a4c9fe2 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java @@ -17,13 +17,14 @@ package aiplatform; // [START aiplatform_predict_text_classification_sample] - +import com.google.cloud.aiplatform.util.ValueConverter; import com.google.cloud.aiplatform.v1beta1.EndpointName; import com.google.cloud.aiplatform.v1beta1.PredictResponse; import com.google.cloud.aiplatform.v1beta1.PredictionServiceClient; import com.google.cloud.aiplatform.v1beta1.PredictionServiceSettings; +import com.google.cloud.aiplatform.v1beta1.schema.predict.instance.TextClassificationPredictionInstance; +import com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ClassificationPredictionResult; import com.google.protobuf.Value; -import com.google.protobuf.util.JsonFormat; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -52,25 +53,38 @@ static void predictTextClassificationSingleLabel( try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create(predictionServiceSettings)) { String location = "us-central1"; - String jsonString = "{\"content\": \"" + content + "\"}"; - EndpointName endpointName = EndpointName.of(project, location, endpointId); - Value parameter = Value.newBuilder().setNumberValue(0).setNumberValue(5).build(); - Value.Builder instance = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, instance); + TextClassificationPredictionInstance predictionInstance = TextClassificationPredictionInstance + .newBuilder() + .setContent(content) + .build(); List instances = new ArrayList<>(); - instances.add(instance.build()); + instances.add(ValueConverter.toValue(predictionInstance)); PredictResponse predictResponse = - predictionServiceClient.predict(endpointName, instances, parameter); + predictionServiceClient.predict(endpointName, instances, ValueConverter.EMPTY_VALUE); System.out.println("Predict Text Classification Response"); System.out.format("\tDeployed Model Id: %s\n", predictResponse.getDeployedModelId()); - System.out.println("Predictions"); + System.out.println("Predictions:\n\n"); for (Value prediction : predictResponse.getPredictionsList()) { - System.out.format("\tPrediction: %s\n", prediction); + + ClassificationPredictionResult.Builder resultBuilder = + ClassificationPredictionResult.newBuilder(); + + // Display names and confidences values correspond to + // IDs in the ID list. + ClassificationPredictionResult result = + (ClassificationPredictionResult) ValueConverter.fromValue(resultBuilder, prediction); + int counter = 0; + for (Long id : result.getIdsList()) { + System.out.printf("Label ID: %d\n", id); + System.out.printf("Label: %s\n", result.getDisplayNames(counter)); + System.out.printf("Confidence: %.4f\n", result.getConfidences(counter)); + counter++; + } } } } diff --git a/samples/snippets/src/test/java/aiplatform/CancelTrainingPipelineSampleTest.java b/samples/snippets/src/test/java/aiplatform/CancelTrainingPipelineSampleTest.java index 1f5066679..f3daec201 100644 --- a/samples/snippets/src/test/java/aiplatform/CancelTrainingPipelineSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CancelTrainingPipelineSampleTest.java @@ -37,7 +37,7 @@ public class CancelTrainingPipelineSampleTest { private static final String DATASET_ID = System.getenv("TRAINING_PIPELINE_DATASET_ID"); private static final String TRAINING_TASK_DEFINITION = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" - + "automl_image_classification_1.0.0.yaml"; + + "automl_image_classification_1.0.0.yaml"; private static String TRAINING_PIPELINE_ID = null; private ByteArrayOutputStream bout; private PrintStream out; diff --git a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobBigquerySampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobBigquerySampleTest.java new file mode 100644 index 000000000..25114e607 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobBigquerySampleTest.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateBatchPredictionJobBigquerySampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String MODEL_ID = System.getenv("BATCH_PREDICTION_TABULAR_BQ_MODEL_ID"); + private static final String BIGQUERY_SOURCE_URI = + "bq://ucaip-sample-tests.table_test.all_bq_types"; + private static final String BIGQUERY_DESTINATION_OUTPUT_URI_PREFIX = "bq://ucaip-sample-tests"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String batchPredictionJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("BATCH_PREDICTION_TABULAR_BQ_MODEL_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + CancelBatchPredictionJobSample.cancelBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Batch Prediction Job"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Batch Prediction Job + DeleteBatchPredictionJobSample.deleteBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Batch"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateBatchPredictionJobBigquerySample() throws IOException { + // Act + String batchPredictionDisplayName = + String.format( + "batch_prediction_bigquery_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateBatchPredictionJobBigquerySample.createBatchPredictionJobBigquerySample( + PROJECT, + batchPredictionDisplayName, + MODEL_ID, + "bigquery", + BIGQUERY_SOURCE_URI, + "bigquery", + BIGQUERY_DESTINATION_OUTPUT_URI_PREFIX); + + // Assert + String got = bout.toString(); + assertThat(got).contains(batchPredictionDisplayName); + assertThat(got).contains("response:"); + batchPredictionJobId = got.split("Name: ")[1].split("batchPredictionJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobSampleTest.java new file mode 100644 index 000000000..1def01b3d --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobSampleTest.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateBatchPredictionJobSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String MODEL_ID = System.getenv("BATCH_PREDICTION_MODEL_ID"); + private static final String GCS_SOURCE_URI = + "gs://ucaip-samples-test-output/inputs/icn_batch_prediction_input.jsonl"; + private static final String GCS_OUTPUT_URI = "gs://ucaip-samples-test-output/"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String batchPredictionJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("BATCH_PREDICTION_MODEL_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + CancelBatchPredictionJobSample.cancelBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Batch Prediction Job"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Batch Prediction Job + DeleteBatchPredictionJobSample.deleteBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Batch"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateBatchPredictionJobSample() throws IOException { + // Act + String batchPredictionDisplayName = + String.format( + "batch_prediction_bigquery_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateBatchPredictionJobSample.createBatchPredictionJobSample( + PROJECT, + batchPredictionDisplayName, + MODEL_ID, + "jsonl", + GCS_SOURCE_URI, + "jsonl", + GCS_OUTPUT_URI); + + // Assert + String got = bout.toString(); + assertThat(got).contains(batchPredictionDisplayName); + assertThat(got).contains("response:"); + batchPredictionJobId = got.split("Name: ")[1].split("batchPredictionJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSampleTest.java new file mode 100644 index 000000000..5ca1e5f0f --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoActionRecognitionSampleTest.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateBatchPredictionJobVideoActionRecognitionSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String MODEL_ID = + System.getenv("BATCH_PREDICTION_VIDEO_ACTION_RECOGNITION_MODEL_ID"); + private static final String GCS_SOURCE_URI = + "gs://ucaip-samples-test-output/inputs/icn_batch_prediction_input.jsonl"; + private static final String GCS_OUTPUT_URI = "gs://ucaip-samples-test-output/"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String batchPredictionJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("BATCH_PREDICTION_VIDEO_ACTION_RECOGNITION_MODEL_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + CancelBatchPredictionJobSample.cancelBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Batch Prediction Job"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Batch Prediction Job + DeleteBatchPredictionJobSample.deleteBatchPredictionJobSample(PROJECT, batchPredictionJobId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Batch"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateBatchPredictionJobVideoActionRecognitionSample() throws IOException { + // Act + String batchPredictionDisplayName = + String.format( + "batch_prediction_video_action_recognition_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateBatchPredictionJobVideoActionRecognitionSample + .createBatchPredictionJobVideoActionRecognitionSample( + PROJECT, batchPredictionDisplayName, MODEL_ID, GCS_SOURCE_URI, GCS_OUTPUT_URI); + + // Assert + String got = bout.toString(); + assertThat(got).contains(batchPredictionDisplayName); + assertThat(got).contains("response:"); + batchPredictionJobId = got.split("Name: ")[1].split("batchPredictionJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobActiveLearningSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobActiveLearningSampleTest.java new file mode 100644 index 000000000..5280476f3 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobActiveLearningSampleTest.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +public class CreateDataLabelingJobActiveLearningSampleTest { + + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String DATASET_ID = + System.getenv("DATA_LABELING_ACTIVE_LEARNING_DATASET_ID"); + private static final String INSTRUCTION_URI = + "gs://ucaip-sample-resources/images/datalabeling_instructions.pdf"; + private static final String INPUTS_SCHEMA_URI = + "gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/image_classification_1.0.0.yaml"; + private static final String ANNOTATION_SPEC = "roses"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String dataLabelingJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("DATA_LABELING_ACTIVE_LEARNING_DATASET_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + // Cancel data labeling job + CancelDataLabelingJobSample.cancelDataLabelingJob(PROJECT, dataLabelingJobId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled Data labeling job"); + TimeUnit.MINUTES.sleep(1); + + // Delete the created dataset + DeleteDataLabelingJobSample.deleteDataLabelingJob(PROJECT, dataLabelingJobId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Data Labeling Job."); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + @Ignore("Avoid creating actual data labeling job for humans") + public void testCreateDataLabelingJobActiveLearningSample() throws IOException { + // Act + String dataLabelingDisplayName = + String.format( + "temp_data_labeling_job_active_learning_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateDataLabelingJobActiveLearningSample.createDataLabelingJobActiveLearningSample( + PROJECT, + dataLabelingDisplayName, + DATASET_ID, + INSTRUCTION_URI, + INPUTS_SCHEMA_URI, + ANNOTATION_SPEC); + + // Assert + String got = bout.toString(); + assertThat(got).contains(dataLabelingDisplayName); + assertThat(got).contains("Create Data Labeling Job Image Response"); + dataLabelingJobId = got.split("Name: ")[1].split("dataLabelingJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobSpecialistPoolSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobSpecialistPoolSampleTest.java new file mode 100644 index 000000000..7c41c5d84 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateDataLabelingJobSpecialistPoolSampleTest.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +public class CreateDataLabelingJobSpecialistPoolSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String DATASET_ID = + System.getenv("DATA_LABELING_ACTIVE_LEARNING_DATASET_ID"); + private static final String SPECIALIST_POOL_ID = + System.getenv("DATA_LABELING_SPECIALIST_POOL_ID"); + private static final String INSTRUCTION_URI = + "gs://ucaip-sample-resources/images/datalabeling_instructions.pdf"; + private static final String INPUTS_SCHEMA_URI = + "gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/image_classification_1.0.0.yaml"; + private static final String ANNOTATION_SPEC = "roses"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String dataLabelingJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("DATA_LABELING_ACTIVE_LEARNING_DATASET_ID"); + requireEnvVar("DATA_LABELING_SPECIALIST_POOL_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + // Cancel data labeling job + CancelDataLabelingJobSample.cancelDataLabelingJob(PROJECT, dataLabelingJobId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled Data labeling job"); + TimeUnit.MINUTES.sleep(1); + + // Delete the created dataset + DeleteDataLabelingJobSample.deleteDataLabelingJob(PROJECT, dataLabelingJobId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Data Labeling Job."); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + @Ignore("Avoid creating actual data labeling job for humans") + public void testCreateDataLabelingJobSpecialistPoolSample() throws IOException { + // Act + String dataLabelingDisplayName = + String.format( + "temp_data_labeling_job_specialist_pool_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateDataLabelingJobSpecialistPoolSample.createDataLabelingJobSpecialistPoolSample( + PROJECT, + dataLabelingDisplayName, + DATASET_ID, + SPECIALIST_POOL_ID, + INSTRUCTION_URI, + INPUTS_SCHEMA_URI, + ANNOTATION_SPEC); + + // Assert + String got = bout.toString(); + assertThat(got).contains(dataLabelingDisplayName); + assertThat(got).contains("Create Data Labeling Job Image Response"); + dataLabelingJobId = got.split("Name: ")[1].split("dataLabelingJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateDatasetTabularGcsSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateDatasetTabularGcsSampleTest.java index 10a26a5e1..7592b9aae 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateDatasetTabularGcsSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateDatasetTabularGcsSampleTest.java @@ -81,8 +81,8 @@ public void testCreateDatasetTabularGcsSample() "temp_create_dataset_table_gcs_test_%s", UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); - CreateDatasetTabularGcsSample.createDatasetTableGcs(PROJECT, - datasetDisplayName, GCS_SOURCE_URI); + CreateDatasetTabularGcsSample.createDatasetTableGcs( + PROJECT, datasetDisplayName, GCS_SOURCE_URI); // Assert String got = bout.toString(); diff --git a/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSampleTest.java new file mode 100644 index 000000000..486322ce4 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSampleTest.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateHyperparameterTuningJobPythonPackageSampleTest { + + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String EXECUTOR_IMAGE_URI = + "us.gcr.io/cloud-aiplatform/training/tf-gpu.2-1:latest"; + private static final String PACKAGE_URI = + "gs://ucaip-test-us-central1/training/pythonpackages/trainer.tar.bz2"; + private static final String PYTHON_MODULE = "trainer.hptuning_trainer"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String hyperparameterJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + + try (JobServiceClient client = JobServiceClient.create(settings)) { + // Cancel hyper parameter job + String hyperparameterJobName = + String.format( + "projects/%s/locations/us-central1/hyperparameterTuningJobs/%s", + PROJECT, hyperparameterJobId); + client.cancelHyperparameterTuningJob(hyperparameterJobName); + + TimeUnit.MINUTES.sleep(1); + + // Delete the created job + client.deleteHyperparameterTuningJobAsync(hyperparameterJobName); + System.out.flush(); + System.setOut(originalPrintStream); + } + } + + @Test + public void testCreateHyperparameterTuningJobPythonPackageSample() throws IOException { + String hyperparameterTuningJobDisplayName = + String.format( + "temp_hyperparameter_tuning_job_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + CreateHyperparameterTuningJobPythonPackageSample + .createHyperparameterTuningJobPythonPackageSample( + PROJECT, + hyperparameterTuningJobDisplayName, + EXECUTOR_IMAGE_URI, + PACKAGE_URI, + PYTHON_MODULE); + + // Assert + String got = bout.toString(); + assertThat(got).contains(hyperparameterTuningJobDisplayName); + assertThat(got).contains("response:"); + hyperparameterJobId = + got.split("Name: ")[1].split("hyperparameterTuningJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobSampleTest.java new file mode 100644 index 000000000..be9273c6e --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateHyperparameterTuningJobSampleTest.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.aiplatform.v1beta1.JobServiceClient; +import com.google.cloud.aiplatform.v1beta1.JobServiceSettings; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateHyperparameterTuningJobSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String CONTAINER_IMAGE_URI = "gcr.io/ucaip-test/ucaip-training-test:latest"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String hyperparameterJobId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + + try (JobServiceClient client = JobServiceClient.create(settings)) { + // Cancel hyper parameter job + String hyperparameterJobName = + String.format( + "projects/%s/locations/us-central1/hyperparameterTuningJobs/%s", + PROJECT, hyperparameterJobId); + client.cancelHyperparameterTuningJob(hyperparameterJobName); + + TimeUnit.MINUTES.sleep(1); + + // Delete the created job + client.deleteHyperparameterTuningJobAsync(hyperparameterJobName); + System.out.flush(); + System.setOut(originalPrintStream); + } + } + + @Test + public void testCreateHyperparameterTuningJobSample() throws IOException { + String hyperparameterTuningJobDisplayName = + String.format( + "temp_hyperparameter_tuning_job_display_name_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateHyperparameterTuningJobSample.createHyperparameterTuningJobSample( + PROJECT, hyperparameterTuningJobDisplayName, CONTAINER_IMAGE_URI); + + String got = bout.toString(); + assertThat(got).contains(hyperparameterTuningJobDisplayName); + assertThat(got).contains("response:"); + hyperparameterJobId = + got.split("Name: ")[1].split("hyperparameterTuningJobs/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomJobSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomJobSampleTest.java new file mode 100644 index 000000000..ac4a97bd9 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomJobSampleTest.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateTrainingPipelineCustomJobSampleTest { + + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String CONTAINER_IMAGE_URI = + "gcr.io/ucaip-sample-tests/mnist-custom-job:latest"; + private static final String GCS_OUTPUT_DIRECTORY = + "gs://ucaip-samples-us-central1/training_pipeline_output"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String trainingPipelineId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + // Cancel the Training Pipeline + CancelTrainingPipelineSample.cancelTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Training Pipeline"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Training Pipeline + DeleteTrainingPipelineSample.deleteTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Training Pipeline."); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateTrainingPipelineCustomJobSample() throws IOException { + // Act + String trainingPipelineDisplayName = + String.format( + "temp_create_training_pipeline_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + String modelDisplayName = + String.format( + "temp_create_training_pipeline_model_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateTrainingPipelineCustomJobSample.createTrainingPipelineCustomJobSample( + PROJECT, + trainingPipelineDisplayName, + modelDisplayName, + CONTAINER_IMAGE_URI, + GCS_OUTPUT_DIRECTORY); + + // Assert + String got = bout.toString(); + assertThat(got).contains(trainingPipelineDisplayName); + trainingPipelineId = got.split("Name: ")[1].split("trainingPipelines/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSampleTest.java new file mode 100644 index 000000000..9065f8191 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineCustomTrainingManagedDatasetSampleTest.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateTrainingPipelineCustomTrainingManagedDatasetSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String DATASET_ID = System.getenv("CUSTOM_MANAGED_DATASET"); + private static final String ANNOTATION_SCHEMA_URI = + "gs://google-cloud-aiplatform/schema/dataset/annotation/image_classification_1.0.0.yaml"; + private static final String TRAINING_CONTAINER_IMAGE_URI = + "gcr.io/ucaip-test/custom-container-managed-dataset:latest"; + private static final String MODEL_CONTAIN_SPEC_IMAGE_URI = + "gcr.io/cloud-aiplatform/prediction/tf-gpu.1-15:latest"; + private static final String GCS_OUTPUT_DIRECTORY = + "gs://ucaip-samples-us-central1/training_pipeline_output/custom_training_managed_dataset"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String trainingPipelineId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + // Cancel the Training Pipeline + CancelTrainingPipelineSample.cancelTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Training Pipeline"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Training Pipeline + DeleteTrainingPipelineSample.deleteTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Training Pipeline."); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateTrainingPipelineCustomTrainingManagedDatasetSample() throws IOException { + // Act + String trainingPipelineDisplayName = + String.format( + "temp_create_training_pipeline_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + String modelDisplayName = + String.format( + "temp_create_training_pipeline_model_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateTrainingPipelineCustomTrainingManagedDatasetSample + .createTrainingPipelineCustomTrainingManagedDatasetSample( + PROJECT, + trainingPipelineDisplayName, + modelDisplayName, + DATASET_ID, + ANNOTATION_SCHEMA_URI, + TRAINING_CONTAINER_IMAGE_URI, + MODEL_CONTAIN_SPEC_IMAGE_URI, + GCS_OUTPUT_DIRECTORY); + + // Assert + String got = bout.toString(); + assertThat(got).contains(trainingPipelineDisplayName); + trainingPipelineId = got.split("Name: ")[1].split("trainingPipelines/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java index 65f7d041b..f8bc4769a 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java @@ -39,21 +39,21 @@ public class CreateTrainingPipelineTabularClassificationSampleTest { private static final String TARGET_COLUMN = "TripType"; private static final String TRANSFORMATION = "[{\"numeric\":{\"columnName\":\"Age\",\"invalidValuesAllowed\":false}}," - + "{\"categorical\":{\"columnName\":\"Job\"}}," - + "{\"categorical\":{\"columnName\":\"MaritalStatus\"}}," - + "{\"categorical\":{\"columnName\":\"Default\"}}," - + "{\"numeric\":{\"columnName\":\"Balance\",\"invalidValuesAllowed\":false}}," - + "{\"categorical\":{\"columnName\":\"Housing\"}}," - + "{\"categorical\":{\"columnName\":\"Loan\"}}," - + "{\"categorical\":{\"columnName\":\"Contact\"}}," - + "{\"numeric\":{\"columnName\":\"Day\",\"invalidValuesAllowed\":false}}," - + "{\"categorical\":{\"columnName\":\"Month\"}}," - + "{\"numeric\":{\"columnName\":\"Duration\",\"invalidValuesAllowed\":false}}," - + "{\"numeric\":{\"columnName\":\"Campaign\",\"invalidValuesAllowed\":false}}," - + "{\"numeric\":{\"columnName\":\"PDays\",\"invalidValuesAllowed\":false}}," - + "{\"numeric\":{\"columnName\":\"Previous\",\"invalidValuesAllowed\":false}}," - + "{\"categorical\":{\"columnName\":\"POutcome\"}}," - + "{\"categorical\":{\"columnName\":\"Deposit\"}}]"; + + "{\"categorical\":{\"columnName\":\"Job\"}}," + + "{\"categorical\":{\"columnName\":\"MaritalStatus\"}}," + + "{\"categorical\":{\"columnName\":\"Default\"}}," + + "{\"numeric\":{\"columnName\":\"Balance\",\"invalidValuesAllowed\":false}}," + + "{\"categorical\":{\"columnName\":\"Housing\"}}," + + "{\"categorical\":{\"columnName\":\"Loan\"}}," + + "{\"categorical\":{\"columnName\":\"Contact\"}}," + + "{\"numeric\":{\"columnName\":\"Day\",\"invalidValuesAllowed\":false}}," + + "{\"categorical\":{\"columnName\":\"Month\"}}," + + "{\"numeric\":{\"columnName\":\"Duration\",\"invalidValuesAllowed\":false}}," + + "{\"numeric\":{\"columnName\":\"Campaign\",\"invalidValuesAllowed\":false}}," + + "{\"numeric\":{\"columnName\":\"PDays\",\"invalidValuesAllowed\":false}}," + + "{\"numeric\":{\"columnName\":\"Previous\",\"invalidValuesAllowed\":false}}," + + "{\"categorical\":{\"columnName\":\"POutcome\"}}," + + "{\"categorical\":{\"columnName\":\"Deposit\"}}]"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java index 3933106f3..3298e0eba 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java @@ -35,23 +35,23 @@ public class CreateTrainingPipelineTabularRegressionSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); private static final String DATASET_ID = - System.getenv("TRAINING_PIPELINE_TABLES_REGRESSION_DATASET_ID"); + System.getenv("TRAINING_PIPELINE_TABLES_REGRESSION_DATASET_ID"); private static final String TARGET_COLUMN = "Amount"; private static final String TRANSFORMATION = "[{\"categorical\":{\"columnName\":\"SC_Group_Desc\"}}," - + "{\"categorical\":{\"columnName\":\"SC_GroupCommod_ID\"}}," - + "{\"categorical\":{\"columnName\":\"SC_GroupCommod_Desc\"}}," - + "{\"numeric\":{\"columnName\":\"SortOrder\",\"invalidValuesAllowed\":false}}," - + "{\"text\":{\"columnName\":\"SC_GeographyIndented_Desc\"}}," - + "{\"numeric\":{\"columnName\":\"SC_Commodity_ID\",\"invalidValuesAllowed\":false}}," - + "{\"text\":{\"columnName\":\"SC_Commodity_Desc\"}}," - + "{\"numeric\":{\"columnName\":\"SC_Attribute_ID\",\"invalidValuesAllowed\":false}}," - + "{\"text\":{\"columnName\":\"SC_Attribute_Desc\"}}," - + "{\"numeric\":{\"columnName\":\"SC_Unit_ID\",\"invalidValuesAllowed\":false}}," - + "{\"numeric\":{\"columnName\":\"Year_ID\",\"invalidValuesAllowed\":false}}," - + "{\"categorical\":{\"columnName\":\"SC_Frequency_Desc\"}}," - + "{\"numeric\":{\"columnName\":\"Timeperiod_ID\",\"invalidValuesAllowed\":false}}," - + "{\"text\":{\"columnName\":\"Timeperiod_Desc\"}}]"; + + "{\"categorical\":{\"columnName\":\"SC_GroupCommod_ID\"}}," + + "{\"categorical\":{\"columnName\":\"SC_GroupCommod_Desc\"}}," + + "{\"numeric\":{\"columnName\":\"SortOrder\",\"invalidValuesAllowed\":false}}," + + "{\"text\":{\"columnName\":\"SC_GeographyIndented_Desc\"}}," + + "{\"numeric\":{\"columnName\":\"SC_Commodity_ID\",\"invalidValuesAllowed\":false}}," + + "{\"text\":{\"columnName\":\"SC_Commodity_Desc\"}}," + + "{\"numeric\":{\"columnName\":\"SC_Attribute_ID\",\"invalidValuesAllowed\":false}}," + + "{\"text\":{\"columnName\":\"SC_Attribute_Desc\"}}," + + "{\"numeric\":{\"columnName\":\"SC_Unit_ID\",\"invalidValuesAllowed\":false}}," + + "{\"numeric\":{\"columnName\":\"Year_ID\",\"invalidValuesAllowed\":false}}," + + "{\"categorical\":{\"columnName\":\"SC_Frequency_Desc\"}}," + + "{\"numeric\":{\"columnName\":\"Timeperiod_ID\",\"invalidValuesAllowed\":false}}," + + "{\"text\":{\"columnName\":\"Timeperiod_Desc\"}}]"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSampleTest.java index bd0f29461..f4e99b2a5 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSampleTest.java @@ -90,14 +90,10 @@ public void testCreateTrainingPipelineTextSentimentAnalysisSample() throws IOExc String tempUuid = UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26); // Act String trainingPipelineDisplayName = - String.format( - "temp_create_training_pipeline_test_%s", - tempUuid); + String.format("temp_create_training_pipeline_test_%s", tempUuid); String modelDisplayName = - String.format( - "temp_create_training_pipeline_model_test_%s", - tempUuid); + String.format("temp_create_training_pipeline_model_test_%s", tempUuid); CreateTrainingPipelineTextSentimentAnalysisSample .createTrainingPipelineTextSentimentAnalysisSample( diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java new file mode 100644 index 000000000..3e39be5f8 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateTrainingPipelineVideoActionRecognitionSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String DATASET_ID = + System.getenv("TRAINING_PIPELINE_VIDEO_ACTION_DATASET_ID"); + private static final String MODEL = "CLOUD"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String trainingPipelineId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("TRAINING_PIPELINE_VIDEO_ACTION_DATASET_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + // Cancel the Training Pipeline + CancelTrainingPipelineSample.cancelTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String cancelResponse = bout.toString(); + assertThat(cancelResponse).contains("Cancelled the Training Pipeline"); + TimeUnit.MINUTES.sleep(2); + + // Delete the Training Pipeline + DeleteTrainingPipelineSample.deleteTrainingPipelineSample(PROJECT, trainingPipelineId); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Deleted Training Pipeline."); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateTrainingPipelineVideoActionRecognitionSample() throws IOException { + // Act + String trainingPipelineDisplayName = + String.format( + "temp_create_training_pipeline_video_action_recognition_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + String modelDisplayName = + String.format( + "temp_create_training_pipeline_video_action_recognition_model_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + + CreateTrainingPipelineVideoActionRecognitionSample + .createTrainingPipelineVideoActionRecognitionSample( + PROJECT, trainingPipelineDisplayName, DATASET_ID, modelDisplayName, MODEL); + + // Assert + String got = bout.toString(); + assertThat(got).contains(DATASET_ID); + assertThat(got).contains("response"); + trainingPipelineId = got.split("Name: ")[1].split("trainingPipelines/")[1].split("\n")[0]; + } +} diff --git a/samples/snippets/src/test/java/aiplatform/DeployModelCustomTrainedModelSampleTest.java b/samples/snippets/src/test/java/aiplatform/DeployModelCustomTrainedModelSampleTest.java new file mode 100644 index 000000000..798e9115a --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/DeployModelCustomTrainedModelSampleTest.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import io.grpc.StatusRuntimeException; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +public class DeployModelCustomTrainedModelSampleTest { + + private static final String PROJECT_ID = "ucaip-sample-tests"; + private static final String MODEL_ID = "4992732768149438464"; + private static final String ENDPOINT_ID = "4366591682456584192"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + + // Undeploy the model + try { + UndeployModelSample.undeployModelSample(PROJECT_ID, ENDPOINT_ID, MODEL_ID); + } catch (IOException | InterruptedException | ExecutionException | TimeoutException e) { + e.printStackTrace(); + } + } + + @Ignore("Issues with undeploy") + @Test + public void testDeployModelCustomTrainedModelSample() throws TimeoutException { + // As model deployment can take a long time, instead try to deploy a + // nonexistent model and confirm that the model was not found, but other + // elements of the request were valid. + String deployedModelDisplayName = + String.format( + "temp_deploy_model_test_%s", + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); + try { + DeployModelCustomTrainedModelSample.deployModelCustomTrainedModelSample( + PROJECT_ID, ENDPOINT_ID, MODEL_ID, deployedModelDisplayName); + // Assert + String got = bout.toString(); + assertThat(got).contains("deployModelResponse"); + } catch (StatusRuntimeException | ExecutionException | InterruptedException | IOException e) { + assertThat(e.getMessage()).contains("is not found."); + } + } +} diff --git a/samples/snippets/src/test/java/aiplatform/DeployModelSampleTest.java b/samples/snippets/src/test/java/aiplatform/DeployModelSampleTest.java index 85c258319..766944fb7 100644 --- a/samples/snippets/src/test/java/aiplatform/DeployModelSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/DeployModelSampleTest.java @@ -25,7 +25,6 @@ import java.io.PrintStream; import java.util.UUID; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.junit.After; import org.junit.Before; @@ -66,8 +65,7 @@ public void tearDown() { } @Test - public void testDeployModelSample() - throws TimeoutException { + public void testDeployModelSample() throws TimeoutException { // As model deployment can take a long time, instead try to deploy a // nonexistent model and confirm that the model was not found, but other // elements of the request were valid. @@ -76,8 +74,8 @@ public void testDeployModelSample() "temp_deploy_model_test_%s", UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); try { - DeployModelSample.deployModelSample(PROJECT_ID, deployedModelDisplayName, - "4366591682456584192", MODEL_ID); + DeployModelSample.deployModelSample( + PROJECT_ID, deployedModelDisplayName, "4366591682456584192", MODEL_ID); // Assert String got = bout.toString(); assertThat(got).contains("is not found."); diff --git a/samples/snippets/src/test/java/aiplatform/ExportModelVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/ExportModelVideoActionRecognitionSampleTest.java new file mode 100644 index 000000000..57cfdb38b --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/ExportModelVideoActionRecognitionSampleTest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ExportModelVideoActionRecognitionSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String MODEL_ID = + System.getenv("EXPORT_MODEL_VIDEO_ACTION_RECOGNITION_MODEL_ID"); + private static final String GCS_DESTINATION_URI_PREFIX = + "gs://ucaip-samples-test-output/tmp/export_model_video_action_recognition_sample"; + private static final String EXPORT_FORMAT = "tf-saved-model"; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("EXPORT_MODEL_VIDEO_ACTION_RECOGNITION_MODEL_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // Delete the export model + String bucketName = GCS_DESTINATION_URI_PREFIX.split("/", 4)[2]; + String objectName = (GCS_DESTINATION_URI_PREFIX.split("/", 4)[3]).concat("model-" + MODEL_ID); + DeleteExportModelSample.deleteExportModelSample(PROJECT, bucketName, objectName); + + // Assert + String deleteResponse = bout.toString(); + assertThat(deleteResponse).contains("Export Model Deleted"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testExportModelVideoActionRecognitionSample() + throws InterruptedException, ExecutionException, TimeoutException, IOException { + // Act + ExportModelVideoActionRecognitionSample.exportModelVideoActionRecognitionSample( + PROJECT, MODEL_ID, GCS_DESTINATION_URI_PREFIX, EXPORT_FORMAT); + + // Assert + String got = bout.toString(); + assertThat(got).contains("exportModelResponse: "); + } +} diff --git a/samples/snippets/src/test/java/aiplatform/GetHyperparameterTuningJobSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetHyperparameterTuningJobSampleTest.java new file mode 100644 index 000000000..685768000 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/GetHyperparameterTuningJobSampleTest.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class GetHyperparameterTuningJobSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String HYPERPARAMETER_TUNING_JOB_ID = System.getenv("GET_HP_TUNING_JOB_ID"); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("GET_HP_TUNING_JOB_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testGetHyperparameterTuningJobSample() throws IOException { + GetHyperparameterTuningJobSample.getHyperparameterTuningJobSample( + PROJECT, HYPERPARAMETER_TUNING_JOB_ID); + + // Assert + String got = bout.toString(); + assertThat(got).contains(HYPERPARAMETER_TUNING_JOB_ID); + } +} diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoActionRecognitionSampleTest.java new file mode 100644 index 000000000..549f7172c --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoActionRecognitionSampleTest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class GetModelEvaluationVideoActionRecognitionSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String MODEL_ID = System.getenv("VIDEO_ACTION_MODEL_ID"); + private static final String EVALUATION_ID = System.getenv("VIDEO_ACTION_EVALUATION_ID"); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + requireEnvVar("VIDEO_ACTION_MODEL_ID"); + requireEnvVar("VIDEO_ACTION_EVALUATION_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testGetModelEvaluationVideoActionRecognitionSample() throws IOException { + // Act + GetModelEvaluationVideoActionRecognitionSample.getModelEvaluationVideoActionRecognitionSample( + PROJECT, MODEL_ID, EVALUATION_ID); + + // Assert + String got = bout.toString(); + assertThat(got).contains(MODEL_ID); + assertThat(got).contains("response:"); + } +} diff --git a/samples/snippets/src/test/java/aiplatform/ImportDataSampleTest.java b/samples/snippets/src/test/java/aiplatform/ImportDataSampleTest.java index 72d5ad90f..dcfaceb9f 100644 --- a/samples/snippets/src/test/java/aiplatform/ImportDataSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/ImportDataSampleTest.java @@ -72,14 +72,13 @@ public void tearDown() { } @Test - public void testImportDataSample() - throws TimeoutException { + public void testImportDataSample() throws TimeoutException { // As import data into dataset can take a long time, instead try to import data into a // nonexistent dataset and confirm that the model was not found, but other // elements of the request were valid. try { ImportDataTextClassificationSingleLabelSample.importDataTextClassificationSingleLabelSample( - PROJECT, DATASET_ID, GCS_SOURCE_URI); + PROJECT, DATASET_ID, GCS_SOURCE_URI); // Assert String got = bout.toString(); assertThat(got).contains("The Dataset does not exist."); diff --git a/samples/snippets/src/test/java/aiplatform/ImportDataVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/ImportDataVideoActionRecognitionSampleTest.java new file mode 100644 index 000000000..dd77e61b7 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/ImportDataVideoActionRecognitionSampleTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.CreateDatasetOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.Dataset; +import com.google.cloud.aiplatform.v1beta1.DatasetName; +import com.google.cloud.aiplatform.v1beta1.DatasetServiceClient; +import com.google.cloud.aiplatform.v1beta1.DatasetServiceSettings; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.protobuf.Empty; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ImportDataVideoActionRecognitionSampleTest { + private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); + private static final String LOCATION = "us-central1"; + private static final String GCS_SOURCE_URI = + "gs://automl-video-demo-data/ucaip-var/swimrun.jsonl"; + + private String datasetId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() + throws IOException, InterruptedException, ExecutionException, TimeoutException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + + // create a temp dataset for importing data + DatasetServiceSettings datasetServiceSettings = + DatasetServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + + try (DatasetServiceClient datasetServiceClient = + DatasetServiceClient.create(datasetServiceSettings)) { + String metadataSchemaUri = + "gs://google-cloud-aiplatform/schema/dataset/metadata/video_1.0.0.yaml"; + LocationName locationName = LocationName.of(PROJECT, LOCATION); + Dataset dataset = + Dataset.newBuilder() + .setDisplayName("test_dataset_display_name") + .setMetadataSchemaUri(metadataSchemaUri) + .build(); + + OperationFuture datasetFuture = + datasetServiceClient.createDatasetAsync(locationName, dataset); + Dataset datasetResponse = datasetFuture.get(300, TimeUnit.SECONDS); + String[] datasetValues = datasetResponse.getName().split("/"); + datasetId = datasetValues[datasetValues.length - 1]; + } + } + + @After + public void tearDown() throws InterruptedException, ExecutionException, IOException { + // delete the temp dataset + DatasetServiceSettings datasetServiceSettings = + DatasetServiceSettings.newBuilder() + .setEndpoint("us-central1-aiplatform.googleapis.com:443") + .build(); + try (DatasetServiceClient datasetServiceClient = + DatasetServiceClient.create(datasetServiceSettings)) { + DatasetName datasetName = DatasetName.of(PROJECT, LOCATION, datasetId); + + OperationFuture operationFuture = + datasetServiceClient.deleteDatasetAsync(datasetName); + operationFuture.get(); + } + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testImportDataVideoActionRecognitionSample() + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // Act + ImportDataVideoActionRecognitionSample.importDataVideoActionRecognitionSample( + PROJECT, datasetId, GCS_SOURCE_URI); + + // Assert + String got = bout.toString(); + assertThat(got).contains("importDataResponse:"); + } +} diff --git a/samples/snippets/src/test/java/aiplatform/PredictTextEntityExtractionSampleTest.java b/samples/snippets/src/test/java/aiplatform/PredictTextEntityExtractionSampleTest.java index dde83fa06..71fd8e8ba 100644 --- a/samples/snippets/src/test/java/aiplatform/PredictTextEntityExtractionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/PredictTextEntityExtractionSampleTest.java @@ -86,4 +86,3 @@ public void testPredictTextEntityExtraction() throws IOException { assertThat(got).contains("Predict Text Entity Extraction Response"); } } - diff --git a/samples/snippets/src/test/java/aiplatform/PredictTextSentimentAnalysisSampleTest.java b/samples/snippets/src/test/java/aiplatform/PredictTextSentimentAnalysisSampleTest.java index 1189e3917..d452dc945 100644 --- a/samples/snippets/src/test/java/aiplatform/PredictTextSentimentAnalysisSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/PredictTextSentimentAnalysisSampleTest.java @@ -87,4 +87,3 @@ public void testPredictTextSentimentAnalysis() throws IOException { assertThat(got).contains("Predict Text Sentiment Analysis Response"); } } - diff --git a/samples/snippets/src/test/java/aiplatform/UploadModelSampleTest.java b/samples/snippets/src/test/java/aiplatform/UploadModelSampleTest.java index 3ebae3b0d..c085f8c67 100644 --- a/samples/snippets/src/test/java/aiplatform/UploadModelSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/UploadModelSampleTest.java @@ -37,8 +37,8 @@ public class UploadModelSampleTest { private static final String METADATASCHEMA_URI = ""; private static final String IMAGE_URI = "gcr.io/cloud-ml-service-public/" - + "cloud-ml-online-prediction-model-server-cpu:" - + "v1_15py3cmle_op_images_20200229_0210_RC00"; + + "cloud-ml-online-prediction-model-server-cpu:" + + "v1_15py3cmle_op_images_20200229_0210_RC00"; private static final String ARTIFACT_URI = "gs://ucaip-samples-us-central1/model/explain/"; private ByteArrayOutputStream bout; private PrintStream out; diff --git a/synth.metadata b/synth.metadata index 60c7c4a16..bc5d9c83a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-aiplatform.git", - "sha": "93bd92128bb4617d090cc29613a262a2c7965d8f" + "sha": "8cd53bb7d8124bb008af858672a44abb541a0d44" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c570f55ea7b64aeced41818609e7b24f0d242bdb", - "internalRef": "340440278" + "sha": "6d65640b1fcbdf26ea76cb720de0ac138cae9bed", + "internalRef": "347036369" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c7824ea48ff6d4d42dfae0849aec8a85acd90bd9" + "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" } } ], @@ -40,6 +40,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/blunderbuss.yml", ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", @@ -48,10 +49,8 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", - ".kokoro/build.sh", ".kokoro/coerce_logs.sh", ".kokoro/common.cfg", ".kokoro/common.sh", @@ -67,7 +66,6 @@ ".kokoro/nightly/java8-osx.cfg", ".kokoro/nightly/java8-win.cfg", ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/clirr.cfg", ".kokoro/presubmit/common.cfg", @@ -80,7 +78,6 @@ ".kokoro/presubmit/java8.cfg", ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", @@ -187,6 +184,7 @@ "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AcceleratorTypeProto.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ActiveLearningConfig.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ActiveLearningConfigOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotatedDatasetName.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Annotation.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationName.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AnnotationOrBuilder.java", @@ -560,10 +558,157 @@ "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UserActionReference.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UserActionReferenceOrBuilder.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UserActionReferenceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VersionName.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/WorkerPoolSpec.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/WorkerPoolSpecOrBuilder.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/XraiAttribution.java", "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/XraiAttributionOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextClassificationPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextExtractionPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/TextSentimentPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageClassificationPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/ImageSegmentationPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoClassificationPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParams.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ClassificationPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularClassificationPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TabularRegressionPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextExtractionPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TextSentimentPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/TimeSeriesForecastingPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoClassificationPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLForecastingProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageClassificationProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLImageSegmentationProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTablesProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextClassificationProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextExtractionProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLTextSentimentProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoActionRecognitionProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoClassificationProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMLVideoObjectTrackingProto.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecasting.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadata.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingMetadataOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlForecastingOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassification.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetection.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentation.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTables.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadata.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassification.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtraction.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentiment.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassification.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java", + "proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/accelerator_type.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/annotation.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/annotation_spec.proto", @@ -596,6 +741,51 @@ "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/io_format.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/saved_query_metadata.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_forecasting.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/specialist_pool.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", "proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto", diff --git a/synth.py b/synth.py index 1f44f2861..531d5293a 100644 --- a/synth.py +++ b/synth.py @@ -29,4 +29,8 @@ bazel_target=f'//google/cloud/aiplatform/{version}:google-cloud-{service}-{version}-java', ) -java.common_templates() \ No newline at end of file +java.common_templates(excludes=[ + '.kokoro/build.sh', + '.kokoro/nightly/samples.cfg', + '.kokoro/presubmit/samples.cfg', +]) \ No newline at end of file diff --git a/versions.txt b/versions.txt index fb3f3a483..58baf96c7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-aiplatform:0.1.0:0.1.0 -proto-google-cloud-aiplatform-v1beta1:0.1.0:0.1.0 -grpc-google-cloud-aiplatform-v1beta1:0.1.0:0.1.0 \ No newline at end of file +google-cloud-aiplatform:0.2.0:0.2.0 +proto-google-cloud-aiplatform-v1beta1:0.2.0:0.2.0 +grpc-google-cloud-aiplatform-v1beta1:0.2.0:0.2.0 \ No newline at end of file